home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-10-19 | 253.8 KB | [ONLN/HLX2] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Banyans VINES patch data (other/banyansVINESPatchData)
| ext
| Unsupported |
1%
| dexvert
| PCP archive log (other/pcpArchiveLog)
| ext
| Unsupported |
100%
| file
| MacBinary II, inited, Fri Oct 14 07:45:04 1994, modified Wed Oct 19 09:56:18 1994, creator 'HLX2', type 'ONLN', 253149 bytes "PT04 MacApp Bugs 3.0" , at 0x3dd5d 6503 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
66%
| TrID
| raw Group 3 FAX bitmap
| default (weak)
| |
33%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [ONLN] |
macFileCreator | [HLX2] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 14 50 54 30 34 20 4d | 61 63 41 70 70 20 42 75 |..PT04 M|acApp Bu|
|00000010| 67 73 20 33 2e 30 00 00 | 00 00 00 00 00 00 00 00 |gs 3.0..|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 4f 4e 4c 4e 48 4c 58 | 32 01 00 00 00 00 00 00 |.ONLNHLX|2.......|
|00000050| 00 00 00 00 03 dc dd 00 | 00 19 67 aa c4 1f c0 aa |........|..g.....|
|00000060| ca d6 02 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 0c c3 00 00 |........|........|
|00000080| 50 54 20 34 20 2d 20 d2 | 42 75 67 73 20 49 6e 20 |PT 4 - .|Bugs In |
|00000090| 4d 61 63 41 70 70 3f 20 | 20 59 65 73 2c 20 42 75 |MacApp? | Yes, Bu|
|000000a0| 74 20 49 20 4c 6f 76 65 | 20 49 74 21 d3 0d 50 6c |t I Love| It!..Pl|
|000000b0| 61 74 66 6f 72 6d 73 20 | 26 20 54 6f 6f 6c 73 09 |atforms |& Tools.|
|000000c0| 0d 52 65 76 69 73 65 64 | 20 62 79 3a 09 4b 65 69 |.Revised| by:.Kei|
|000000d0| 74 68 20 52 6f 6c 6c 69 | 6e 09 4f 63 74 6f 62 65 |th Rolli|n.Octobe|
|000000e0| 72 20 31 39 39 30 0d 57 | 72 69 74 74 65 6e 20 62 |r 1990.W|ritten b|
|000000f0| 79 3a 09 4b 65 69 74 68 | 20 52 6f 6c 6c 69 6e 2c |y:.Keith| Rollin,|
|00000100| 20 4e 2e 20 4c 69 6e 64 | 65 6e 62 65 72 67 2c 20 | N. Lind|enberg, |
|00000110| 74 68 65 20 4d 61 63 41 | 70 70 20 45 6e 67 69 6e |the MacA|pp Engin|
|00000120| 65 65 72 73 2c 20 61 6e | 64 20 59 6f 75 09 41 75 |eers, an|d You.Au|
|00000130| 67 75 73 74 20 31 39 39 | 30 0d 54 68 69 73 20 54 |gust 199|0.This T|
|00000140| 65 63 68 6e 69 63 61 6c | 20 4e 6f 74 65 20 64 65 |echnical| Note de|
|00000150| 73 63 72 69 62 65 73 20 | 74 68 65 20 6c 61 74 65 |scribes |the late|
|00000160| 73 74 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 61 |st infor|mation a|
|00000170| 62 6f 75 74 20 62 75 67 | 73 20 6f 72 20 75 6e 65 |bout bug|s or une|
|00000180| 78 70 65 63 74 65 64 20 | d2 66 65 61 74 75 72 65 |xpected |.feature|
|00000190| 73 d3 20 69 6e 20 4d 61 | 63 41 70 70 2e 20 20 57 |s. in Ma|cApp. W|
|000001a0| 68 65 72 65 20 70 6f 73 | 73 69 62 6c 65 2c 20 73 |here pos|sible, s|
|000001b0| 6f 6c 75 74 69 6f 6e 73 | 20 61 6e 64 20 66 69 78 |olutions| and fix|
|000001c0| 65 73 20 61 72 65 20 6e | 6f 74 65 64 2e 20 20 44 |es are n|oted. D|
|000001d0| 54 53 20 69 6e 74 65 6e | 64 73 20 74 68 69 73 20 |TS inten|ds this |
|000001e0| 4e 6f 74 65 20 74 6f 20 | 62 65 20 61 20 63 6f 6d |Note to |be a com|
|000001f0| 70 6c 65 74 65 20 6c 69 | 73 74 20 6f 66 20 61 6c |plete li|st of al|
|00000200| 6c 20 6b 6e 6f 77 6e 20 | 62 75 67 73 20 69 6e 20 |l known |bugs in |
|00000210| 4d 61 63 41 70 70 20 61 | 6e 64 20 77 69 6c 6c 20 |MacApp a|nd will |
|00000220| 75 70 64 61 74 65 20 69 | 74 20 61 73 20 6f 6c 64 |update i|t as old|
|00000230| 20 62 75 67 73 20 61 72 | 65 20 66 69 78 65 64 20 | bugs ar|e fixed |
|00000240| 6f 72 20 6e 65 77 20 6f | 6e 65 73 20 61 70 70 65 |or new o|nes appe|
|00000250| 61 72 2e 20 20 49 66 20 | 79 6f 75 20 68 61 76 65 |ar. If |you have|
|00000260| 20 65 6e 63 6f 75 6e 74 | 65 72 65 64 20 61 20 62 | encount|ered a b|
|00000270| 75 67 20 6f 72 20 75 6e | 65 78 70 65 63 74 65 64 |ug or un|expected|
|00000280| 20 66 65 61 74 75 72 65 | 20 77 68 69 63 68 20 69 | feature| which i|
|00000290| 73 20 6e 6f 74 20 64 65 | 73 63 72 69 62 65 64 20 |s not de|scribed |
|000002a0| 68 65 72 65 2c 20 62 65 | 20 73 75 72 65 20 74 6f |here, be| sure to|
|000002b0| 20 6c 65 74 20 44 54 53 | 20 6b 6e 6f 77 2e 20 20 | let DTS| know. |
|000002c0| 53 70 65 63 69 66 69 63 | 20 63 6f 64 65 20 65 78 |Specific| code ex|
|000002d0| 61 6d 70 6c 65 73 20 61 | 6e 64 20 73 75 67 67 65 |amples a|nd sugge|
|000002e0| 73 74 65 64 20 66 69 78 | 65 73 20 61 72 65 20 75 |sted fix|es are u|
|000002f0| 73 65 66 75 6c 2e 0d 54 | 68 69 73 20 76 65 72 73 |seful..T|his vers|
|00000300| 69 6f 6e 20 6f 66 20 74 | 68 65 20 4e 6f 74 65 20 |ion of t|he Note |
|00000310| 72 65 66 6c 65 63 74 73 | 20 74 68 65 20 73 74 61 |reflects| the sta|
|00000320| 74 65 20 6f 66 20 4d 61 | 63 41 70 70 20 32 2e 30 |te of Ma|cApp 2.0|
|00000330| 2e 31 2e 20 54 68 65 20 | 6c 61 74 65 73 74 20 76 |.1. The |latest v|
|00000340| 65 72 73 69 6f 6e 20 6f | 66 20 74 68 69 73 20 4e |ersion o|f this N|
|00000350| 6f 74 65 20 63 61 6e 20 | 61 6c 77 61 79 73 20 62 |ote can |always b|
|00000360| 65 20 66 6f 75 6e 64 20 | 6f 6e 20 41 70 70 6c 65 |e found |on Apple|
|00000370| 4c 69 6e 6b 20 69 6e 20 | 74 68 65 20 44 65 76 65 |Link in |the Deve|
|00000380| 6c 6f 70 65 72 20 53 65 | 72 76 69 63 65 73 20 42 |loper Se|rvices B|
|00000390| 75 6c 6c 65 74 69 6e 20 | 42 6f 61 72 64 2e 0d 43 |ulletin |Board..C|
|000003a0| 68 61 6e 67 65 73 20 73 | 69 6e 63 65 20 41 75 67 |hanges s|ince Aug|
|000003b0| 75 73 74 20 31 39 39 30 | 3a 20 55 70 64 61 74 65 |ust 1990|: Update|
|000003c0| 64 20 66 6f 72 20 4d 61 | 63 41 70 70 20 32 2e 30 |d for Ma|cApp 2.0|
|000003d0| 2e 31 2e 20 52 65 76 69 | 73 65 64 20 6c 69 6e 65 |.1. Revi|sed line|
|000003e0| 20 63 6f 75 6e 74 20 6f | 66 20 4d 61 63 41 70 70 | count o|f MacApp|
|000003f0| 20 32 2e 30 2e 0d 41 64 | 64 65 64 3a 09 54 45 64 | 2.0..Ad|ded:.TEd|
|00000400| 69 74 54 65 78 74 20 23 | 32 3b 20 54 45 76 74 48 |itText #|2; TEvtH|
|00000410| 61 6e 64 6c 65 72 20 23 | 31 3b 20 54 47 72 69 64 |andler #|1; TGrid|
|00000420| 56 69 65 77 20 23 33 3b | 20 54 54 45 56 69 65 77 |View #3;| TTEView|
|00000430| 20 23 35 2c 20 37 2c 20 | 39 3b 20 54 56 69 65 77 | #5, 7, |9; TView|
|00000440| 20 23 36 3b 20 41 73 73 | 6f 72 74 65 64 20 54 56 | #6; Ass|orted TV|
|00000450| 69 65 77 2e 46 6f 63 75 | 73 20 23 38 3b 20 47 6c |iew.Focu|s #8; Gl|
|00000460| 6f 62 61 6c 73 20 23 31 | 36 3b 20 4d 41 42 75 69 |obals #1|6; MABui|
|00000470| 6c 64 20 23 31 33 3b 20 | 44 65 62 75 67 20 23 31 |ld #13; |Debug #1|
|00000480| 30 2e 0d 55 70 64 61 74 | 65 64 3a 09 54 41 70 70 |0..Updat|ed:.TApp|
|00000490| 6c 69 63 61 74 69 6f 6e | 20 23 33 3b 20 54 50 6f |lication| #3; TPo|
|000004a0| 70 75 70 20 23 35 3b 20 | 54 53 63 72 6f 6c 6c 65 |pup #5; |TScrolle|
|000004b0| 72 20 23 31 3b 20 54 53 | 74 64 50 72 69 6e 74 48 |r #1; TS|tdPrintH|
|000004c0| 61 6e 64 6c 65 72 20 23 | 32 2c 20 33 3b 20 54 54 |andler #|2, 3; TT|
|000004d0| 45 56 69 65 77 20 23 33 | 3b 20 54 56 69 65 77 20 |EView #3|; TView |
|000004e0| 23 33 3b 20 54 57 69 6e | 64 6f 77 20 23 33 3b 20 |#3; TWin|dow #3; |
|000004f0| 41 73 73 6f 72 74 65 64 | 20 54 56 69 65 77 2e 46 |Assorted| TView.F|
|00000500| 6f 63 75 73 20 23 33 3b | 20 47 6c 6f 62 61 6c 73 |ocus #3;| Globals|
|00000510| 20 23 37 2c 20 38 3b 20 | 4d 41 42 75 69 6c 64 20 | #7, 8; |MABuild |
|00000520| 23 32 2c 20 31 31 3b 20 | 44 65 62 75 67 20 23 34 |#2, 11; |Debug #4|
|00000530| 2c 20 35 3b 20 53 41 44 | 45 20 43 6f 6d 70 61 74 |, 5; SAD|E Compat|
|00000540| 69 62 69 6c 69 74 79 20 | 23 31 3b 20 54 48 49 4e |ibility |#1; THIN|
|00000550| 4b 20 50 61 73 63 61 6c | 20 23 32 2e 0d 52 65 6d |K Pascal| #2..Rem|
|00000560| 6f 76 65 64 3a 09 54 41 | 70 70 6c 69 63 61 74 69 |oved:.TA|pplicati|
|00000570| 6f 6e 20 23 35 3b 20 54 | 43 6f 6d 6d 61 6e 64 20 |on #5; T|Command |
|00000580| 23 31 3b 20 54 43 74 6c | 4d 67 72 20 23 31 3b 20 |#1; TCtl|Mgr #1; |
|00000590| 54 44 65 73 6b 53 63 72 | 61 70 56 69 65 77 20 23 |TDeskScr|apView #|
|000005a0| 31 3b 20 54 47 72 69 64 | 56 69 65 77 20 23 32 3b |1; TGrid|View #2;|
|000005b0| 20 54 49 63 6f 6e 20 23 | 31 3b 20 54 50 6f 70 75 | TIcon #|1; TPopu|
|000005c0| 70 20 23 31 2c 20 32 2c | 20 33 3b 20 54 53 74 64 |p #1, 2,| 3; TStd|
|000005d0| 50 72 69 6e 74 48 61 6e | 64 6c 65 72 20 23 34 3b |PrintHan|dler #4;|
|000005e0| 20 54 54 45 56 69 65 77 | 20 23 31 2c 20 32 2c 20 | TTEView| #1, 2, |
|000005f0| 36 2c 20 38 3b 20 54 56 | 69 65 77 20 23 35 3b 20 |6, 8; TV|iew #5; |
|00000600| 54 57 69 6e 64 6f 77 20 | 23 31 2c 20 32 3b 20 41 |TWindow |#1, 2; A|
|00000610| 73 73 6f 72 74 65 64 20 | 54 56 69 65 77 2e 46 6f |ssorted |TView.Fo|
|00000620| 63 75 73 20 23 37 3b 20 | 47 6c 6f 62 61 6c 73 20 |cus #7; |Globals |
|00000630| 23 31 2d 35 2c 20 39 2c | 20 31 33 2d 31 35 3b 20 |#1-5, 9,| 13-15; |
|00000640| 44 65 62 75 67 20 23 38 | 2c 20 39 3b 20 54 48 49 |Debug #8|, 9; THI|
|00000650| 4e 4b 20 50 61 73 63 61 | 6c 20 23 31 3b 20 4f 74 |NK Pasca|l #1; Ot|
|00000660| 68 65 72 20 23 32 2e 0d | 54 68 65 20 4d 61 63 41 |her #2..|The MacA|
|00000670| 70 70 20 4d 61 6e 61 67 | 65 6d 65 6e 74 20 77 6f |pp Manag|ement wo|
|00000680| 75 6c 64 20 6c 69 6b 65 | 20 74 6f 20 6e 6f 74 65 |uld like| to note|
|00000690| 20 74 68 61 74 20 4d 61 | 63 41 70 70 20 69 73 20 | that Ma|cApp is |
|000006a0| 61 20 68 69 67 68 20 76 | 65 6c 6f 63 69 74 79 20 |a high v|elocity |
|000006b0| 72 69 64 65 20 77 69 74 | 68 20 6d 61 6e 79 20 74 |ride wit|h many t|
|000006c0| 77 69 73 74 73 20 61 6e | 64 20 74 75 72 6e 73 20 |wists an|d turns |
|000006d0| 28 61 6c 6c 20 61 6c 69 | 6b 65 29 2e 20 20 50 6c |(all ali|ke). Pl|
|000006e0| 65 61 73 65 20 6b 65 65 | 70 20 79 6f 75 72 20 68 |ease kee|p your h|
|000006f0| 61 6e 64 73 20 69 6e 73 | 69 64 65 20 61 74 20 61 |ands ins|ide at a|
|00000700| 6c 6c 20 74 69 6d 65 73 | 2e 0d 54 68 65 72 65 20 |ll times|..There |
|00000710| 61 72 65 20 31 30 37 2c | 37 34 34 20 6c 69 6e 65 |are 107,|744 line|
|00000720| 73 20 6f 66 20 4f 62 6a | 65 63 74 20 50 61 73 63 |s of Obj|ect Pasc|
|00000730| 61 6c 2c 20 43 2b 2b 2c | 20 41 73 73 65 6d 62 6c |al, C++,| Assembl|
|00000740| 79 2c 20 61 6e 64 20 52 | 65 7a 20 63 6f 64 65 20 |y, and R|ez code |
|00000750| 74 68 61 74 20 67 6f 20 | 69 6e 74 6f 20 74 68 65 |that go |into the|
|00000760| 20 4d 61 63 41 70 70 20 | 4c 69 62 72 61 72 79 20 | MacApp |Library |
|00000770| 61 6e 64 20 42 75 69 6c | 64 20 73 79 73 74 65 6d |and Buil|d system|
|00000780| 2e 20 20 41 73 20 73 75 | 63 68 2c 20 69 74 20 69 |. As su|ch, it i|
|00000790| 73 20 69 6e 65 76 69 74 | 61 62 6c 65 20 74 68 61 |s inevit|able tha|
|000007a0| 74 20 61 20 66 65 77 20 | 62 75 67 73 20 63 72 65 |t a few |bugs cre|
|000007b0| 65 70 20 69 6e 2e 20 20 | 54 68 65 20 70 75 72 70 |ep in. |The purp|
|000007c0| 6f 73 65 20 6f 66 20 74 | 68 69 73 20 4e 6f 74 65 |ose of t|his Note|
|000007d0| 20 69 73 20 74 6f 20 69 | 6e 66 6f 72 6d 20 79 6f | is to i|nform yo|
|000007e0| 75 20 6f 66 20 74 68 65 | 73 65 20 62 75 67 73 2c |u of the|se bugs,|
|000007f0| 20 6e 6f 74 20 74 6f 20 | 73 63 61 72 65 20 79 6f | not to |scare yo|
|00000800| 75 20 61 77 61 79 20 66 | 72 6f 6d 20 4d 61 63 41 |u away f|rom MacA|
|00000810| 70 70 2e 20 20 54 68 65 | 72 65 20 61 72 65 20 64 |pp. The|re are d|
|00000820| 6f 7a 65 6e 73 20 6f 66 | 20 63 6f 6d 6d 65 72 63 |ozens of| commerc|
|00000830| 69 61 6c 6c 79 20 61 76 | 61 69 6c 61 62 6c 65 20 |ially av|ailable |
|00000840| 70 72 6f 67 72 61 6d 73 | 20 74 68 61 74 20 6c 65 |programs| that le|
|00000850| 61 64 20 6e 6f 72 6d 61 | 6c 20 65 76 65 72 79 64 |ad norma|l everyd|
|00000860| 61 79 20 6c 69 76 65 73 | 20 77 68 69 63 68 20 61 |ay lives| which a|
|00000870| 72 65 20 62 75 69 6c 74 | 20 6f 6e 20 74 6f 70 20 |re built| on top |
|00000880| 6f 66 20 4d 61 63 41 70 | 70 20 61 73 20 69 74 20 |of MacAp|p as it |
|00000890| 73 74 61 6e 64 73 20 74 | 6f 64 61 79 2e 20 20 4d |stands t|oday. M|
|000008a0| 6f 73 74 20 6f 66 20 74 | 68 65 20 62 75 67 73 20 |ost of t|he bugs |
|000008b0| 6c 69 73 74 65 64 20 68 | 65 72 65 20 64 6f 20 6e |listed h|ere do n|
|000008c0| 6f 74 20 73 68 6f 77 20 | 75 70 20 69 6e 20 72 65 |ot show |up in re|
|000008d0| 67 75 6c 61 72 20 75 73 | 65 20 28 61 74 20 6c 65 |gular us|e (at le|
|000008e0| 61 73 74 2c 20 74 68 65 | 79 20 64 6f 6e d5 74 20 |ast, the|y don.t |
|000008f0| 69 6e 20 6f 75 72 20 74 | 65 73 74 20 70 72 6f 67 |in our t|est prog|
|00000900| 72 61 6d 73 29 2c 20 73 | 6f 20 74 68 65 79 20 6d |rams), s|o they m|
|00000910| 61 79 20 6e 6f 74 20 61 | 66 66 65 63 74 20 79 6f |ay not a|ffect yo|
|00000920| 75 2e 20 49 66 20 74 68 | 65 79 20 64 6f 2c 20 79 |u. If th|ey do, y|
|00000930| 6f 75 20 63 61 6e 20 75 | 73 65 20 74 68 65 20 66 |ou can u|se the f|
|00000940| 69 78 65 73 20 6f 72 20 | 73 6f 6c 75 74 69 6f 6e |ixes or |solution|
|00000950| 73 20 69 64 65 6e 74 69 | 66 69 65 64 20 68 65 72 |s identi|fied her|
|00000960| 65 20 28 d2 46 69 78 65 | 73 d3 20 61 72 65 20 69 |e (.Fixe|s. are i|
|00000970| 6e 74 65 6e 64 65 64 20 | 74 6f 20 62 65 20 61 70 |ntended |to be ap|
|00000980| 70 6c 69 65 64 20 64 69 | 72 65 63 74 6c 79 20 74 |plied di|rectly t|
|00000990| 6f 20 74 68 65 20 4d 61 | 63 41 70 70 20 73 6f 75 |o the Ma|cApp sou|
|000009a0| 72 63 65 2c 20 77 68 69 | 6c 65 20 d2 73 6f 6c 75 |rce, whi|le .solu|
|000009b0| 74 69 6f 6e 73 d3 20 69 | 64 65 6e 74 69 66 79 20 |tions. i|dentify |
|000009c0| 74 65 63 68 6e 69 71 75 | 65 73 20 74 6f 20 6f 76 |techniqu|es to ov|
|000009d0| 65 72 72 69 64 65 20 6f | 72 20 61 76 6f 69 64 20 |erride o|r avoid |
|000009e0| 61 20 6d 65 74 68 6f 64 | 20 74 68 65 20 70 72 6f |a method| the pro|
|000009f0| 62 6c 65 6d 29 2e 0d 4d | 61 63 41 70 70 2e 4c 69 |blem)..M|acApp.Li|
|00000a00| 62 20 42 75 67 73 0d 54 | 41 70 70 6c 69 63 61 74 |b Bugs.T|Applicat|
|00000a10| 69 6f 6e 0d 31 2e 09 57 | 68 65 6e 20 62 65 69 6e |ion.1..W|hen bein|
|00000a20| 67 20 73 75 73 70 65 6e | 64 65 64 20 69 6e 20 4d |g suspen|ded in M|
|00000a30| 75 6c 74 69 46 69 6e 64 | 65 72 2c 20 4d 61 63 41 |ultiFind|er, MacA|
|00000a40| 70 70 20 63 6f 6d 6d 69 | 74 73 20 63 6f 6d 6d 61 |pp commi|ts comma|
|00000a50| 6e 64 20 6f 62 6a 65 63 | 74 73 20 77 68 69 63 68 |nd objec|ts which|
|00000a60| 20 61 66 66 65 63 74 20 | 74 68 65 20 63 6c 69 70 | affect |the clip|
|00000a70| 62 6f 61 72 64 2c 20 72 | 61 74 68 65 72 20 74 68 |board, r|ather th|
|00000a80| 61 6e 20 63 68 65 63 6b | 69 6e 67 20 69 66 20 74 |an check|ing if t|
|00000a90| 68 65 20 73 63 72 61 70 | 20 68 61 73 20 63 68 61 |he scrap| has cha|
|00000aa0| 6e 67 65 64 20 77 68 65 | 6e 20 73 77 69 74 63 68 |nged whe|n switch|
|00000ab0| 69 6e 67 20 62 61 63 6b | 20 69 6e 2e 0d 53 6f 6c |ing back| in..Sol|
|00000ac0| 75 74 69 6f 6e 3a 09 4e | 6f 74 20 79 65 74 20 64 |ution:.N|ot yet d|
|00000ad0| 65 74 65 72 6d 69 6e 65 | 64 2e 20 20 54 68 69 73 |etermine|d. This|
|00000ae0| 20 69 73 20 61 6e 20 61 | 72 65 61 20 6f 66 20 73 | is an a|rea of s|
|00000af0| 65 72 69 6f 75 73 20 63 | 6f 6e 73 69 64 65 72 61 |erious c|onsidera|
|00000b00| 74 69 6f 6e 20 66 6f 72 | 20 74 68 65 20 6e 65 78 |tion for| the nex|
|00000b10| 74 20 76 65 72 73 69 6f | 6e 20 6f 66 20 4d 61 63 |t versio|n of Mac|
|00000b20| 41 70 70 2e 0d 32 2e 09 | 4d 61 63 41 70 70 20 73 |App..2..|MacApp s|
|00000b30| 68 6f 75 6c 64 20 68 69 | 64 65 20 74 68 65 20 63 |hould hi|de the c|
|00000b40| 6c 69 70 62 6f 61 72 64 | 20 77 69 6e 64 6f 77 20 |lipboard| window |
|00000b50| 6f 6e 20 61 20 73 75 73 | 70 65 6e 64 20 65 76 65 |on a sus|pend eve|
|00000b60| 6e 74 20 61 6e 64 20 72 | 65 64 69 73 70 6c 61 79 |nt and r|edisplay|
|00000b70| 20 69 74 20 6f 6e 20 61 | 20 72 65 73 75 6d 65 20 | it on a| resume |
|00000b80| 65 76 65 6e 74 2e 20 0d | 53 6f 6c 75 74 69 6f 6e |event. .|Solution|
|00000b90| 3a 09 4f 76 65 72 72 69 | 64 65 20 74 68 65 20 54 |:.Overri|de the T|
|00000ba0| 41 70 70 6c 69 63 61 74 | 69 6f 6e 20 6d 65 74 68 |Applicat|ion meth|
|00000bb0| 6f 64 73 20 41 62 6f 75 | 74 54 6f 4c 6f 73 65 43 |ods Abou|tToLoseC|
|00000bc0| 6f 6e 74 72 6f 6c 20 61 | 6e 64 20 52 65 67 61 69 |ontrol a|nd Regai|
|00000bd0| 6e 43 6f 6e 74 72 6f 6c | 2e 20 20 41 62 6f 75 74 |nControl|. About|
|00000be0| 54 6f 4c 6f 73 65 43 6f | 6e 74 72 6f 6c 20 73 68 |ToLoseCo|ntrol sh|
|00000bf0| 6f 75 6c 64 20 72 65 6d | 65 6d 62 65 72 20 77 68 |ould rem|ember wh|
|00000c00| 65 74 68 65 72 20 6f 72 | 20 6e 6f 74 20 74 68 65 |ether or| not the|
|00000c10| 20 63 6c 69 70 62 6f 61 | 72 64 20 77 69 6e 64 6f | clipboa|rd windo|
|00000c20| 77 20 69 73 20 63 75 72 | 72 65 6e 74 6c 79 20 6f |w is cur|rently o|
|00000c30| 70 65 6e 20 61 6e 64 20 | 63 61 6c 6c 20 67 43 6c |pen and |call gCl|
|00000c40| 69 70 57 69 6e 64 6f 77 | 2e 43 6c 6f 73 65 20 69 |ipWindow|.Close i|
|00000c50| 66 20 69 74 20 69 73 2e | 20 20 52 65 67 61 69 6e |f it is.| Regain|
|00000c60| 43 6f 6e 74 72 6f 6c 20 | 73 68 6f 75 6c 64 20 6c |Control |should l|
|00000c70| 6f 6f 6b 20 61 74 20 74 | 68 65 20 73 74 61 74 65 |ook at t|he state|
|00000c80| 20 6f 66 20 74 68 65 20 | 63 6c 69 70 62 6f 61 72 | of the |clipboar|
|00000c90| 64 20 77 69 6e 64 6f 77 | 20 73 61 76 65 64 20 62 |d window| saved b|
|00000ca0| 79 20 41 62 6f 75 74 54 | 6f 4c 6f 73 65 43 6f 6e |y AboutT|oLoseCon|
|00000cb0| 74 72 6f 6c 2c 20 61 6e | 64 20 63 61 6c 6c 20 67 |trol, an|d call g|
|00000cc0| 43 6c 69 70 57 69 6e 64 | 6f 77 2e 4f 70 65 6e 20 |ClipWind|ow.Open |
|00000cd0| 69 66 20 74 68 65 20 77 | 69 6e 64 6f 77 20 6e 65 |if the w|indow ne|
|00000ce0| 65 64 73 20 74 6f 20 62 | 65 20 72 65 73 68 6f 77 |eds to b|e reshow|
|00000cf0| 6e 2e 0d 33 2e 09 54 68 | 65 72 65 20 61 72 65 20 |n..3..Th|ere are |
|00000d00| 70 72 6f 62 6c 65 6d 73 | 20 77 69 74 68 20 74 68 |problems| with th|
|00000d10| 65 20 76 61 6c 75 65 20 | 6f 66 20 74 68 65 20 6d |e value |of the m|
|00000d20| 6f 75 73 65 44 69 64 4d | 6f 76 65 20 70 61 72 61 |ouseDidM|ove para|
|00000d30| 6d 65 74 65 72 20 74 6f | 20 54 43 6f 6d 6d 61 6e |meter to| TComman|
|00000d40| 64 20 77 68 65 6e 20 63 | 61 6c 6c 65 64 20 62 79 |d when c|alled by|
|00000d50| 20 54 41 70 70 6c 69 63 | 61 74 69 6f 6e 2e 54 72 | TApplic|ation.Tr|
|00000d60| 61 63 6b 4d 6f 75 73 65 | 2e 20 20 57 68 65 6e 20 |ackMouse|. When |
|00000d70| 74 68 65 20 54 72 61 63 | 6b 50 68 61 73 65 20 69 |the Trac|kPhase i|
|00000d80| 73 20 74 72 61 63 6b 50 | 72 65 73 73 2c 20 54 43 |s trackP|ress, TC|
|00000d90| 6f 6d 6d 61 6e 64 2e 54 | 72 61 63 6b 4d 6f 75 73 |ommand.T|rackMous|
|00000da0| 65 20 69 73 20 63 61 6c | 6c 65 64 20 77 69 74 68 |e is cal|led with|
|00000db0| 20 6d 6f 75 73 65 44 69 | 64 4d 6f 76 65 20 73 65 | mouseDi|dMove se|
|00000dc0| 74 20 74 6f 20 54 52 55 | 45 20 65 76 65 6e 20 74 |t to TRU|E even t|
|00000dd0| 68 6f 75 67 68 20 74 68 | 65 20 6d 6f 75 73 65 20 |hough th|e mouse |
|00000de0| 68 61 73 6e d5 74 20 68 | 61 64 20 61 20 63 68 61 |hasn.t h|ad a cha|
|00000df0| 6e 63 65 20 74 6f 20 6d | 6f 76 65 2e 20 20 57 68 |nce to m|ove. Wh|
|00000e00| 65 6e 20 74 68 65 20 54 | 72 61 63 6b 50 68 61 73 |en the T|rackPhas|
|00000e10| 65 20 69 73 20 74 72 61 | 63 6b 4d 6f 76 65 2c 20 |e is tra|ckMove, |
|00000e20| 6d 6f 75 73 65 44 69 64 | 4d 6f 76 65 20 69 73 20 |mouseDid|Move is |
|00000e30| 46 41 4c 53 45 20 77 68 | 65 6e 65 76 65 72 20 74 |FALSE wh|enever t|
|00000e40| 68 65 20 6d 6f 75 73 65 | 20 6d 6f 76 65 73 20 62 |he mouse| moves b|
|00000e50| 61 63 6b 20 69 6e 73 69 | 64 65 20 74 68 65 20 68 |ack insi|de the h|
|00000e60| 79 73 74 65 72 65 73 69 | 73 20 72 61 6e 67 65 2e |ysteresi|s range.|
|00000e70| 20 20 57 68 65 6e 20 74 | 68 65 20 54 72 61 63 6b | When t|he Track|
|00000e80| 50 68 61 73 65 20 69 73 | 20 74 72 61 63 6b 52 65 |Phase is| trackRe|
|00000e90| 6c 65 61 73 65 2c 20 6d | 6f 75 73 65 44 69 64 4d |lease, m|ouseDidM|
|00000ea0| 6f 76 65 20 69 73 20 54 | 52 55 45 20 65 76 65 6e |ove is T|RUE even|
|00000eb0| 20 69 66 20 74 68 65 20 | 6d 6f 75 73 65 20 6e 65 | if the |mouse ne|
|00000ec0| 76 65 72 20 6d 6f 76 65 | 64 2e 0d 46 69 78 3a 09 |ver move|d..Fix:.|
|00000ed0| 49 6e 20 54 41 70 70 6c | 69 63 61 74 69 6f 6e 2e |In TAppl|ication.|
|00000ee0| 54 72 61 63 6b 4d 6f 75 | 73 65 20 28 66 69 6c 65 |TrackMou|se (file|
|00000ef0| 20 55 4d 61 63 41 70 70 | 2e 54 41 70 70 6c 69 63 | UMacApp|.TApplic|
|00000f00| 61 74 69 6f 6e 2e 70 29 | 3a 0d a5 09 54 68 65 20 |ation.p)|:...The |
|00000f10| 66 69 72 73 74 20 63 61 | 6c 6c 20 74 6f 20 54 72 |first ca|ll to Tr|
|00000f20| 61 63 6b 4f 6e 63 65 20 | 73 68 6f 75 6c 64 20 72 |ackOnce |should r|
|00000f30| 65 61 64 3a 0d 09 09 20 | 20 20 20 54 72 61 63 6b |ead:... | Track|
|00000f40| 4f 6e 63 65 28 74 72 61 | 63 6b 50 72 65 73 73 2c |Once(tra|ckPress,|
|00000f50| 20 46 41 4c 53 45 29 3b | 0d a5 09 54 68 65 20 61 | FALSE);|...The a|
|00000f60| 73 73 69 67 6e 6d 65 6e | 74 20 6f 66 20 64 69 64 |ssignmen|t of did|
|00000f70| 4d 6f 76 65 20 73 68 6f | 75 6c 64 20 72 65 61 64 |Move sho|uld read|
|00000f80| 3a 0d 09 20 20 20 20 64 | 69 64 4d 6f 76 65 20 3a |:.. d|idMove :|
|00000f90| 3d 20 6d 6f 76 65 64 4f | 6e 63 65 20 26 20 28 4e |= movedO|nce & (N|
|00000fa0| 4f 54 20 45 71 75 61 6c | 56 50 74 28 70 72 65 76 |OT Equal|VPt(prev|
|00000fb0| 69 6f 75 73 50 6f 69 6e | 74 2c 20 74 68 65 4d 6f |iousPoin|t, theMo|
|00000fc0| 75 73 65 29 29 2e 0d a5 | 09 54 68 65 20 6c 61 73 |use))...|.The las|
|00000fd0| 74 20 63 61 6c 6c 20 74 | 6f 20 54 72 61 63 6b 4f |t call t|o TrackO|
|00000fe0| 6e 63 65 20 73 68 6f 75 | 6c 64 20 72 65 61 64 3a |nce shou|ld read:|
|00000ff0| 0d 09 09 20 20 20 20 54 | 72 61 63 6b 4f 6e 63 65 |... T|rackOnce|
|00001000| 28 74 72 61 63 6b 52 65 | 6c 65 61 73 65 2c 20 64 |(trackRe|lease, d|
|00001010| 69 64 4d 6f 76 65 29 3b | 0d 09 4f 6e 63 65 20 74 |idMove);|..Once t|
|00001020| 68 6f 73 65 20 63 68 61 | 6e 67 65 73 20 68 61 76 |hose cha|nges hav|
|00001030| 65 20 62 65 65 6e 20 61 | 70 70 6c 69 65 64 2c 20 |e been a|pplied, |
|00001040| 74 68 65 20 70 61 72 74 | 73 20 6f 66 20 4d 61 63 |the part|s of Mac|
|00001050| 41 70 70 20 74 68 61 74 | 20 61 73 73 75 6d 65 20 |App that| assume |
|00001060| 6d 6f 75 73 65 44 69 64 | 4d 6f 76 65 20 3d 20 54 |mouseDid|Move = T|
|00001070| 52 55 45 20 77 68 65 6e | 20 61 54 72 61 63 6b 50 |RUE when| aTrackP|
|00001080| 68 61 73 65 20 3d 20 54 | 72 61 63 6b 50 72 65 73 |hase = T|rackPres|
|00001090| 73 20 6e 65 65 64 20 74 | 6f 20 62 65 20 75 70 64 |s need t|o be upd|
|000010a0| 61 74 65 64 2e 20 20 49 | 6e 20 74 68 65 20 6d 65 |ated. I|n the me|
|000010b0| 74 68 6f 64 73 20 54 43 | 65 6c 6c 53 65 6c 65 63 |thods TC|ellSelec|
|000010c0| 74 43 6f 6d 6d 61 6e 64 | 2e 54 72 61 63 6b 4d 6f |tCommand|.TrackMo|
|000010d0| 75 73 65 20 61 6e 64 20 | 54 52 43 53 65 6c 65 63 |use and |TRCSelec|
|000010e0| 74 43 6f 6d 6d 61 6e 64 | 2e 54 72 61 63 6b 4d 6f |tCommand|.TrackMo|
|000010f0| 75 73 65 20 28 66 69 6c | 65 20 55 47 72 69 64 56 |use (fil|e UGridV|
|00001100| 69 65 77 2e 69 6e 63 31 | 2e 70 29 2c 20 72 65 70 |iew.inc1|.p), rep|
|00001110| 6c 61 63 65 3a 0d 20 20 | 20 20 20 20 20 20 20 20 |lace:. | |
|00001120| 20 20 20 20 49 46 20 6d | 6f 75 73 65 44 69 64 4d | IF m|ouseDidM|
|00001130| 6f 76 65 20 54 48 45 4e | 0d 09 57 69 74 68 3a 0d |ove THEN|..With:.|
|00001140| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 49 46 | | IF|
|00001150| 20 6d 6f 75 73 65 44 69 | 64 4d 6f 76 65 20 7c 20 | mouseDi|dMove | |
|00001160| 28 61 54 72 61 63 6b 50 | 68 61 73 65 20 3d 20 54 |(aTrackP|hase = T|
|00001170| 72 61 63 6b 50 72 65 73 | 73 29 20 54 48 45 4e 0d |rackPres|s) THEN.|
|00001180| 09 59 6f 75 20 73 68 6f | 75 6c 64 20 61 6c 73 6f |.You sho|uld also|
|00001190| 20 6d 61 6b 65 20 73 69 | 6d 69 6c 61 72 20 63 68 | make si|milar ch|
|000011a0| 61 6e 67 65 73 20 74 6f | 20 79 6f 75 72 20 61 70 |anges to| your ap|
|000011b0| 70 6c 69 63 61 74 69 6f | 6e d5 73 20 73 6f 75 72 |plicatio|n.s sour|
|000011c0| 63 65 2c 20 69 66 20 61 | 70 70 6c 69 63 61 62 6c |ce, if a|pplicabl|
|000011d0| 65 2e 20 46 6f 72 20 69 | 6e 73 74 61 6e 63 65 2c |e. For i|nstance,|
|000011e0| 20 69 6e 20 55 43 61 6c | 63 2e 69 6e 63 31 2e 70 | in UCal|c.inc1.p|
|000011f0| 2c 20 54 43 6f 6c 75 6d | 6e 53 65 6c 65 63 74 6f |, TColum|nSelecto|
|00001200| 72 2e 54 72 61 63 6b 4d | 6f 75 73 65 20 61 6e 64 |r.TrackM|ouse and|
|00001210| 20 54 52 6f 77 53 65 6c | 65 63 74 6f 72 2e 54 72 | TRowSel|ector.Tr|
|00001220| 61 63 6b 4d 6f 75 73 65 | 20 6e 65 65 64 20 74 6f |ackMouse| need to|
|00001230| 20 63 68 65 63 6b 20 66 | 6f 72 20 61 54 72 61 63 | check f|or aTrac|
|00001240| 6b 50 68 61 73 65 20 3d | 20 54 72 61 63 6b 50 72 |kPhase =| TrackPr|
|00001250| 65 73 73 2e 0d 34 2e 09 | 57 69 74 68 20 74 68 65 |ess..4..|With the|
|00001260| 73 65 20 63 68 61 6e 67 | 65 73 2c 20 69 74 20 69 |se chang|es, it i|
|00001270| 73 20 70 6f 73 73 69 62 | 6c 65 20 74 6f 20 65 78 |s possib|le to ex|
|00001280| 70 65 72 69 65 6e 63 65 | 20 73 6f 6d 65 20 66 65 |perience| some fe|
|00001290| 65 64 62 61 63 6b 20 70 | 72 6f 62 6c 65 6d 73 2e |edback p|roblems.|
|000012a0| 20 20 46 6f 72 20 65 78 | 61 6d 70 6c 65 2c 20 77 | For ex|ample, w|
|000012b0| 68 65 6e 20 72 65 73 69 | 7a 69 6e 67 20 74 68 65 |hen resi|zing the|
|000012c0| 20 63 6f 6c 75 6d 6e 20 | 77 69 64 74 68 73 20 69 | column |widths i|
|000012d0| 6e 20 61 20 73 70 72 65 | 61 64 73 68 65 65 74 2c |n a spre|adsheet,|
|000012e0| 20 43 61 6c 63 20 64 72 | 61 77 73 20 74 68 65 20 | Calc dr|aws the |
|000012f0| 69 6e 69 74 69 61 6c 20 | 76 65 72 74 69 63 61 6c |initial |vertical|
|00001300| 20 6c 69 6e 65 2c 20 77 | 61 69 74 73 20 75 6e 74 | line, w|aits unt|
|00001310| 69 6c 20 74 68 65 20 6d | 6f 75 73 65 20 6d 6f 76 |il the m|ouse mov|
|00001320| 65 64 20 6f 75 74 73 69 | 64 65 20 74 68 65 20 68 |ed outsi|de the h|
|00001330| 79 73 74 65 72 65 73 69 | 73 20 72 61 6e 67 65 2c |ysteresi|s range,|
|00001340| 20 61 6e 64 20 74 68 65 | 6e 2c 20 62 65 66 6f 72 | and the|n, befor|
|00001350| 65 20 64 72 61 77 69 6e | 67 20 74 68 65 20 76 65 |e drawin|g the ve|
|00001360| 72 74 69 63 61 6c 20 6c | 69 6e 65 20 69 6e 20 69 |rtical l|ine in i|
|00001370| 74 73 20 6e 65 77 20 6c | 6f 63 61 74 69 6f 6e 2c |ts new l|ocation,|
|00001380| 20 65 72 61 73 65 73 20 | 74 68 65 20 6f 6c 64 20 | erases |the old |
|00001390| 76 65 72 74 69 63 61 6c | 20 6c 69 6e 65 20 69 6e |vertical| line in|
|000013a0| 20 74 68 65 20 77 72 6f | 6e 67 20 70 6c 61 63 65 | the wro|ng place|
|000013b0| 2e 20 20 54 68 69 73 20 | 6c 65 61 76 65 73 20 74 |. This |leaves t|
|000013c0| 77 6f 20 76 65 72 74 69 | 63 61 6c 20 6c 69 6e 65 |wo verti|cal line|
|000013d0| 73 20 6f 6e 20 74 68 65 | 20 73 63 72 65 65 6e 20 |s on the| screen |
|000013e0| 61 73 20 67 61 72 62 61 | 67 65 2e 0d 46 69 78 3a |as garba|ge..Fix:|
|000013f0| 09 49 6e 20 55 4d 61 63 | 41 70 70 2e 54 41 70 70 |.In UMac|App.TApp|
|00001400| 6c 69 63 61 74 69 6f 6e | 2e 70 2c 20 72 65 70 6c |lication|.p, repl|
|00001410| 61 63 65 20 74 68 65 20 | 66 6f 75 72 74 68 20 6f |ace the |fourth o|
|00001420| 63 63 75 72 72 65 6e 63 | 65 20 6f 66 3a 0d 20 20 |ccurrenc|e of:. |
|00001430| 20 20 20 20 20 20 20 20 | 20 20 20 20 70 72 65 76 | | prev|
|00001440| 69 6f 75 73 50 6f 69 6e | 74 20 3a 3d 20 74 68 65 |iousPoin|t := the|
|00001450| 4d 6f 75 73 65 3b 0d 09 | 57 69 74 68 3a 0d 20 20 |Mouse;..|With:. |
|00001460| 20 20 20 20 20 20 20 20 | 20 20 20 20 49 46 20 64 | | IF d|
|00001470| 69 64 4d 6f 76 65 20 54 | 48 45 4e 0d 20 20 20 20 |idMove T|HEN. |
|00001480| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 70 72 | | pr|
|00001490| 65 76 69 6f 75 73 50 6f | 69 6e 74 20 3a 3d 20 74 |eviousPo|int := t|
|000014a0| 68 65 4d 6f 75 73 65 3b | 0d 35 2e 09 54 68 65 20 |heMouse;|.5..The |
|000014b0| 73 6f 6c 75 74 69 6f 6e | 20 74 68 61 74 20 70 72 |solution| that pr|
|000014c0| 65 76 69 6f 75 73 6c 79 | 20 6f 63 63 75 70 69 65 |eviously| occupie|
|000014d0| 64 20 74 68 69 73 20 73 | 70 6f 74 20 63 61 75 73 |d this s|pot caus|
|000014e0| 65 64 20 6d 6f 72 65 20 | 70 72 6f 62 6c 65 6d 73 |ed more |problems|
|000014f0| 20 74 68 61 74 20 69 74 | 20 66 69 78 65 64 2e 20 | that it| fixed. |
|00001500| 20 57 65 20 72 65 6d 6f | 76 65 64 20 69 74 20 75 | We remo|ved it u|
|00001510| 6e 74 69 6c 20 77 65 20 | 63 61 6e 20 67 65 74 20 |ntil we |can get |
|00001520| 6f 75 72 20 61 63 74 20 | 74 6f 67 65 74 68 65 72 |our act |together|
|00001530| 2e 0d 54 43 6f 6d 6d 61 | 6e 64 20 28 69 6e 63 6c |..TComma|nd (incl|
|00001540| 75 64 69 6e 67 20 73 75 | 62 63 6c 61 73 73 65 73 |uding su|bclasses|
|00001550| 29 0d 31 2e 09 46 69 78 | 65 64 20 69 6e 20 4d 61 |).1..Fix|ed in Ma|
|00001560| 63 41 70 70 20 32 2e 30 | 2e 31 2e 0d 32 2e 09 49 |cApp 2.0|.1..2..I|
|00001570| 66 20 61 20 66 61 69 6c | 75 72 65 20 6f 63 63 75 |f a fail|ure occu|
|00001580| 72 73 20 69 6e 20 54 44 | 6f 63 75 6d 65 6e 74 2e |rs in TD|ocument.|
|00001590| 52 65 76 65 72 74 2c 20 | 54 52 65 76 65 72 74 44 |Revert, |TRevertD|
|000015a0| 6f 63 43 6f 6d 6d 61 6e | 64 2e 44 6f 49 74 20 74 |ocComman|d.DoIt t|
|000015b0| 72 69 65 73 20 74 6f 20 | 73 68 6f 77 20 74 68 65 |ries to |show the|
|000015c0| 20 72 65 76 65 72 74 65 | 64 20 64 6f 63 75 6d 65 | reverte|d docume|
|000015d0| 6e 74 2e 20 20 54 68 69 | 73 20 69 73 20 74 68 65 |nt. Thi|s is the|
|000015e0| 20 63 6f 72 72 65 63 74 | 20 74 68 69 6e 67 20 74 | correct| thing t|
|000015f0| 6f 20 64 6f 20 69 66 20 | 74 68 65 20 75 73 65 72 |o do if |the user|
|00001600| 20 63 61 6e 63 65 6c 65 | 64 20 6f 75 74 20 6f 66 | cancele|d out of|
|00001610| 20 74 68 65 20 72 65 76 | 65 72 74 20 69 66 20 61 | the rev|ert if a|
|00001620| 20 73 69 6c 65 6e 74 20 | 66 61 69 6c 75 72 65 20 | silent |failure |
|00001630| 69 73 20 73 69 67 6e 61 | 6c 65 64 20 28 74 68 69 |is signa|led (thi|
|00001640| 73 20 63 6f 75 6c 64 20 | 68 61 70 70 65 6e 20 69 |s could |happen i|
|00001650| 6e 20 44 69 73 6b 46 69 | 6c 65 43 68 61 6e 67 65 |n DiskFi|leChange|
|00001660| 64 29 2e 20 20 48 6f 77 | 65 76 65 72 20 69 66 20 |d). How|ever if |
|00001670| 61 20 72 65 61 6c 20 65 | 72 72 6f 72 20 6f 63 63 |a real e|rror occ|
|00001680| 75 72 72 65 64 2c 20 79 | 6f 75 20 63 61 6e 6e 6f |urred, y|ou canno|
|00001690| 74 20 6c 65 61 76 65 20 | 74 68 65 20 64 6f 63 75 |t leave |the docu|
|000016a0| 6d 65 6e 74 20 6f 70 65 | 6e 3b 20 79 6f 75 20 64 |ment ope|n; you d|
|000016b0| 65 66 69 6e 69 74 65 6c | 79 20 6d 75 73 74 20 63 |efinitel|y must c|
|000016c0| 6c 6f 73 65 20 69 74 2e | 20 4f 74 68 65 72 77 69 |lose it.| Otherwi|
|000016d0| 73 65 20 74 68 65 20 61 | 70 70 6c 69 63 61 74 69 |se the a|pplicati|
|000016e0| 6f 6e 20 6d 61 79 20 62 | 6f 6d 62 20 69 6e 20 74 |on may b|omb in t|
|000016f0| 68 65 20 6e 65 78 74 20 | 6f 70 65 72 61 74 69 6f |he next |operatio|
|00001700| 6e 20 69 6e 76 6f 6c 76 | 69 6e 67 20 74 68 65 20 |n involv|ing the |
|00001710| 64 6f 63 75 6d 65 6e 74 | 20 28 65 2e 67 2e 2c 20 |document| (e.g., |
|00001720| 74 68 65 20 6e 65 78 74 | 20 73 63 72 65 65 6e 20 |the next| screen |
|00001730| 72 65 66 72 65 73 68 29 | 2e 0d 09 57 65 20 68 61 |refresh)|...We ha|
|00001740| 76 65 20 74 6f 20 64 69 | 73 74 69 6e 67 75 69 73 |ve to di|stinguis|
|00001750| 68 20 74 68 72 65 65 20 | 63 6c 61 73 73 65 73 20 |h three |classes |
|00001760| 6f 66 20 65 72 72 6f 72 | 73 3a 0d 31 29 09 74 68 |of error|s:.1).th|
|00001770| 65 20 75 73 65 72 20 63 | 61 6e 63 65 6c 65 64 20 |e user c|anceled |
|00001780| 6f 75 74 20 6f 66 20 74 | 68 65 20 6f 70 65 72 61 |out of t|he opera|
|00001790| 74 69 6f 6e 20 69 6e 20 | 43 68 65 63 6b 44 69 73 |tion in |CheckDis|
|000017a0| 6b 46 69 6c 65 2c 0d 32 | 29 09 61 20 72 65 61 6c |kFile,.2|).a real|
|000017b0| 20 65 72 72 6f 72 20 77 | 61 73 20 64 69 73 63 6f | error w|as disco|
|000017c0| 76 65 72 65 64 20 69 6e | 20 43 68 65 63 6b 44 69 |vered in| CheckDi|
|000017d0| 73 6b 46 69 6c 65 2c 0d | 33 29 09 61 20 72 65 61 |skFile,.|3).a rea|
|000017e0| 6c 20 65 72 72 6f 72 20 | 6f 63 63 75 72 72 65 64 |l error |occurred|
|000017f0| 20 64 75 72 69 6e 67 20 | 72 65 62 75 69 6c 64 69 | during |rebuildi|
|00001800| 6e 67 20 74 68 65 20 64 | 6f 63 75 6d 65 6e 74 20 |ng the d|ocument |
|00001810| 69 6e 20 44 6f 49 6e 69 | 74 69 61 6c 53 74 61 74 |in DoIni|tialStat|
|00001820| 65 20 6f 72 20 52 65 61 | 64 46 72 6f 6d 46 69 6c |e or Rea|dFromFil|
|00001830| 65 2e 0d 09 49 6e 20 74 | 68 65 20 66 69 72 73 74 |e...In t|he first|
|00001840| 20 61 6e 64 20 73 65 63 | 6f 6e 64 20 63 61 73 65 | and sec|ond case|
|00001850| 73 2c 20 74 68 65 20 6d | 65 6d 6f 72 79 2d 72 65 |s, the m|emory-re|
|00001860| 73 69 64 65 6e 74 20 76 | 65 72 73 69 6f 6e 20 6f |sident v|ersion o|
|00001870| 66 20 74 68 65 20 64 6f | 63 75 6d 65 6e 74 20 68 |f the do|cument h|
|00001880| 61 73 20 6e 6f 74 20 62 | 65 65 6e 20 63 68 61 6e |as not b|een chan|
|00001890| 67 65 64 20 77 68 65 6e | 20 79 6f 75 20 72 65 61 |ged when| you rea|
|000018a0| 63 68 20 48 64 6c 52 65 | 76 65 72 74 43 6d 64 2e |ch HdlRe|vertCmd.|
|000018b0| 20 20 49 6e 20 74 68 65 | 20 74 68 69 72 64 20 63 | In the| third c|
|000018c0| 61 73 65 2c 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |ase, the| documen|
|000018d0| 74 20 6d 61 79 20 62 65 | 20 73 65 76 65 72 65 6c |t may be| severel|
|000018e0| 79 20 64 61 6d 61 67 65 | 64 2e 20 20 54 68 65 72 |y damage|d. Ther|
|000018f0| 65 66 6f 72 65 2c 20 69 | 6e 20 74 68 65 20 66 69 |efore, i|n the fi|
|00001900| 72 73 74 20 74 77 6f 20 | 63 61 73 65 73 20 74 68 |rst two |cases th|
|00001910| 65 72 65 20 69 73 20 6e | 6f 20 6e 65 65 64 20 74 |ere is n|o need t|
|00001920| 6f 20 63 61 6c 6c 20 53 | 68 6f 77 52 65 76 65 72 |o call S|howRever|
|00001930| 74 65 64 20 28 69 74 20 | 64 6f 65 73 6e d5 74 20 |ted (it |doesn.t |
|00001940| 68 75 72 74 20 65 69 74 | 68 65 72 29 2c 20 77 68 |hurt eit|her), wh|
|00001950| 69 6c 65 20 69 6e 20 74 | 68 65 20 74 68 69 72 64 |ile in t|he third|
|00001960| 20 63 61 73 65 20 79 6f | 75 20 6d 75 73 74 20 63 | case yo|u must c|
|00001970| 6c 6f 73 65 20 74 68 65 | 20 64 6f 63 75 6d 65 6e |lose the| documen|
|00001980| 74 2e 0d 09 43 61 73 65 | 20 6f 6e 65 20 69 73 20 |t...Case| one is |
|00001990| 65 61 73 79 20 74 6f 20 | 72 65 63 6f 67 6e 69 7a |easy to |recogniz|
|000019a0| 65 20 28 65 72 72 6f 72 | 20 3d 20 30 29 2c 20 62 |e (error| = 0), b|
|000019b0| 75 74 20 66 6f 72 20 74 | 68 65 20 73 65 63 6f 6e |ut for t|he secon|
|000019c0| 64 20 61 6e 64 20 74 68 | 69 72 64 20 63 61 73 65 |d and th|ird case|
|000019d0| 73 2c 20 65 72 72 6f 72 | 20 3c 3e 20 30 2e 20 20 |s, error| <> 0. |
|000019e0| 54 6f 20 64 69 73 74 69 | 6e 67 75 69 73 68 20 62 |To disti|nguish b|
|000019f0| 65 74 77 65 65 6e 20 74 | 68 65 6d 2c 20 79 6f 75 |etween t|hem, you|
|00001a00| 20 63 61 6e 20 70 75 6c | 6c 20 61 20 74 72 69 63 | can pul|l a tric|
|00001a10| 6b 3a 20 20 79 6f 75 20 | 6b 6e 6f 77 20 74 68 61 |k: you |know tha|
|00001a20| 74 20 74 68 65 20 52 65 | 76 65 72 74 20 6d 65 6e |t the Re|vert men|
|00001a30| 75 20 69 74 65 6d 20 69 | 73 20 6f 6e 6c 79 20 65 |u item i|s only e|
|00001a40| 6e 61 62 6c 65 64 20 69 | 66 20 66 44 6f 63 75 6d |nabled i|f fDocum|
|00001a50| 65 6e 74 2e 66 43 68 61 | 6e 67 65 43 6f 75 6e 74 |ent.fCha|ngeCount|
|00001a60| 20 69 73 20 67 72 65 61 | 74 65 72 20 74 68 61 6e | is grea|ter than|
|00001a70| 20 7a 65 72 6f 2e 20 20 | 54 68 65 72 65 66 6f 72 | zero. |Therefor|
|00001a80| 65 2c 20 79 6f 75 20 6d | 6f 76 65 20 53 65 74 43 |e, you m|ove SetC|
|00001a90| 68 61 6e 67 65 43 6f 75 | 6e 74 28 30 29 20 69 6e |hangeCou|nt(0) in|
|00001aa0| 20 54 44 6f 63 75 6d 65 | 6e 74 2e 52 65 76 65 72 | TDocume|nt.Rever|
|00001ab0| 74 20 62 65 66 6f 72 65 | 20 61 6e 79 20 6f 70 65 |t before| any ope|
|00001ac0| 72 61 74 69 6f 6e 20 74 | 68 61 74 20 63 61 6e 20 |ration t|hat can |
|00001ad0| 63 6c 6f 62 62 65 72 20 | 74 68 65 20 64 6f 63 75 |clobber |the docu|
|00001ae0| 6d 65 6e 74 20 28 69 2e | 65 2e 2c 20 62 65 66 6f |ment (i.|e., befo|
|00001af0| 72 65 20 74 68 65 20 63 | 61 6c 6c 20 74 6f 20 46 |re the c|all to F|
|00001b00| 72 65 65 44 61 74 61 29 | 2e 20 20 54 68 69 73 20 |reeData)|. This |
|00001b10| 77 61 79 2c 20 79 6f 75 | 20 63 61 6e 20 64 69 73 |way, you| can dis|
|00001b20| 74 69 6e 67 75 69 73 68 | 20 62 65 74 77 65 65 6e |tinguish| between|
|00001b30| 20 74 68 65 20 73 65 63 | 6f 6e 64 20 61 6e 64 20 | the sec|ond and |
|00001b40| 74 68 69 72 64 20 63 61 | 73 65 73 20 69 6e 20 48 |third ca|ses in H|
|00001b50| 64 6c 52 65 76 65 72 74 | 43 6d 64 20 62 79 20 63 |dlRevert|Cmd by c|
|00001b60| 68 65 63 6b 69 6e 67 20 | 66 43 68 61 6e 67 65 43 |hecking |fChangeC|
|00001b70| 6f 75 6e 74 2e 0d 46 69 | 78 3a 09 43 68 61 6e 67 |ount..Fi|x:.Chang|
|00001b80| 65 20 74 68 65 20 66 61 | 69 6c 75 72 65 20 68 61 |e the fa|ilure ha|
|00001b90| 6e 64 6c 69 6e 67 20 70 | 72 6f 63 65 64 75 72 65 |ndling p|rocedure|
|00001ba0| 20 69 6e 20 54 52 65 76 | 65 72 74 44 6f 63 43 6f | in TRev|ertDocCo|
|00001bb0| 6d 6d 61 6e 64 2e 44 6f | 49 74 20 28 66 69 6c 65 |mmand.Do|It (file|
|00001bc0| 20 55 4d 61 63 41 70 70 | 2e 54 44 6f 63 75 6d 65 | UMacApp|.TDocume|
|00001bd0| 6e 74 2e 70 29 20 74 6f | 3a 0d 20 20 20 20 20 20 |nt.p) to|:. |
|00001be0| 20 20 20 20 20 20 20 20 | 50 52 4f 43 45 44 55 52 | |PROCEDUR|
|00001bf0| 45 20 48 64 6c 52 65 76 | 65 72 74 43 6d 64 28 65 |E HdlRev|ertCmd(e|
|00001c00| 72 72 6f 72 3a 20 4f 53 | 45 72 72 3b 20 6d 65 73 |rror: OS|Err; mes|
|00001c10| 73 61 67 65 3a 20 4c 4f | 4e 47 49 4e 54 29 3b 0d |sage: LO|NGINT);.|
|00001c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001c30| 20 20 42 45 47 49 4e 0d | 20 20 20 20 20 20 20 20 | BEGIN.| |
|00001c40| 20 20 20 20 20 20 20 20 | 20 20 7b 43 68 65 63 6b | | {Check|
|00001c50| 20 77 68 65 74 68 65 72 | 20 74 68 65 20 64 6f 63 | whether| the doc|
|00001c60| 75 6d 65 6e 74 20 68 61 | 73 20 61 6c 72 65 61 64 |ument ha|s alread|
|00001c70| 79 20 62 65 65 6e 20 63 | 6c 6f 62 62 65 72 65 64 |y been c|lobbered|
|00001c80| 20 7d 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | }. | |
|00001c90| 20 20 20 20 20 49 46 20 | 66 43 68 61 6e 67 65 64 | IF |fChanged|
|00001ca0| 44 6f 63 75 6d 65 6e 74 | 2e 47 65 74 43 68 61 6e |Document|.GetChan|
|00001cb0| 67 65 43 6f 75 6e 74 20 | 3d 20 30 20 54 48 45 4e |geCount |= 0 THEN|
|00001cc0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00001cd0| 20 20 20 20 20 20 20 66 | 43 68 61 6e 67 65 64 44 | f|ChangedD|
|00001ce0| 6f 63 75 6d 65 6e 74 2e | 43 6c 6f 73 65 20 20 7b |ocument.|Close {|
|00001cf0| 72 65 6d 6f 76 65 20 74 | 68 65 20 64 65 62 72 69 |remove t|he debri|
|00001d00| 73 20 6c 65 66 74 20 62 | 79 20 66 43 68 61 6e 67 |s left b|y fChang|
|00001d10| 65 64 44 6f 63 75 6d 65 | 6e 74 7d 0d 20 20 20 20 |edDocume|nt}. |
|00001d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 45 4e | | EN|
|00001d30| 44 3b 0d 09 49 6e 20 54 | 44 6f 63 75 6d 65 6e 74 |D;..In T|Document|
|00001d40| 2e 52 65 76 65 72 74 2c | 20 6d 6f 76 65 20 74 68 |.Revert,| move th|
|00001d50| 65 20 6c 69 6e 65 0d 20 | 20 20 20 20 20 20 20 20 |e line. | |
|00001d60| 20 20 20 20 20 20 53 65 | 74 43 68 61 6e 67 65 43 | Se|tChangeC|
|00001d70| 6f 75 6e 74 28 30 29 3b | 0d 09 62 65 66 6f 72 65 |ount(0);|..before|
|00001d80| 20 74 68 65 20 6c 69 6e | 65 0d 20 20 20 20 20 20 | the lin|e. |
|00001d90| 20 20 20 20 20 20 20 20 | 20 46 72 65 65 44 61 74 | | FreeDat|
|00001da0| 61 3b 0d 33 2e 09 49 74 | 20 69 73 20 70 6f 74 65 |a;.3..It| is pote|
|00001db0| 6e 74 69 61 6c 6c 79 20 | 70 72 6f 62 6c 65 6d 61 |ntially |problema|
|00001dc0| 74 69 63 20 68 61 76 69 | 6e 67 20 50 61 67 65 20 |tic havi|ng Page |
|00001dd0| 53 65 74 75 70 20 61 73 | 20 61 6e 20 75 6e 64 6f |Setup as| an undo|
|00001de0| 61 62 6c 65 20 63 6f 6d | 6d 61 6e 64 2c 20 73 69 |able com|mand, si|
|00001df0| 6e 63 65 20 74 68 65 20 | 76 69 65 77 20 61 6e 64 |nce the |view and|
|00001e00| 20 70 72 69 6e 74 65 72 | 20 64 72 69 76 65 72 20 | printer| driver |
|00001e10| 63 6f 6e 74 65 78 74 20 | 63 61 6e 20 63 68 61 6e |context |can chan|
|00001e20| 67 65 2e 20 20 41 6e 20 | 65 78 61 6d 70 6c 65 20 |ge. An |example |
|00001e30| 6f 66 20 74 68 69 73 20 | 69 73 20 73 68 6f 77 6e |of this |is shown|
|00001e40| 20 77 69 74 68 20 74 68 | 65 20 66 6f 6c 6c 6f 77 | with th|e follow|
|00001e50| 69 6e 67 20 73 74 65 70 | 73 3a 0d 31 29 09 4c 61 |ing step|s:.1).La|
|00001e60| 75 6e 63 68 20 61 6e 79 | 20 4d 61 63 41 70 70 20 |unch any| MacApp |
|00001e70| 61 70 70 6c 69 63 61 74 | 69 6f 6e 2e 0d 32 29 09 |applicat|ion..2).|
|00001e80| 41 63 63 65 73 73 20 74 | 68 65 20 50 61 67 65 20 |Access t|he Page |
|00001e90| 53 65 74 75 70 20 64 69 | 61 6c 6f 67 20 62 6f 78 |Setup di|alog box|
|00001ea0| 20 66 72 6f 6d 20 74 68 | 65 20 46 69 6c 65 20 6d | from th|e File m|
|00001eb0| 65 6e 75 2e 0d 33 29 09 | 54 61 6b 65 20 6e 6f 74 |enu..3).|Take not|
|00001ec0| 69 63 65 20 6f 66 20 77 | 68 69 63 68 20 70 72 69 |ice of w|hich pri|
|00001ed0| 6e 74 65 72 20 64 72 69 | 76 65 72 20 69 73 20 63 |nter dri|ver is c|
|00001ee0| 75 72 72 65 6e 74 6c 79 | 20 62 65 69 6e 67 20 75 |urrently| being u|
|00001ef0| 73 65 64 20 61 6e 64 20 | 6d 61 6b 65 20 61 20 63 |sed and |make a c|
|00001f00| 68 61 6e 67 65 20 74 6f | 20 74 68 65 20 64 69 61 |hange to| the dia|
|00001f10| 6c 6f 67 20 62 6f 78 20 | 28 69 2e 65 2e 2c 20 73 |log box |(i.e., s|
|00001f20| 77 69 74 63 68 20 74 6f | 20 d2 6c 61 6e 64 73 63 |witch to| .landsc|
|00001f30| 61 70 65 d3 20 70 72 69 | 6e 74 69 6e 67 29 2c 20 |ape. pri|nting), |
|00001f40| 63 6c 69 63 6b 20 6f 6e | 20 74 68 65 20 4f 4b 20 |click on| the OK |
|00001f50| 62 75 74 74 6f 6e 2e 0d | 34 29 09 41 63 63 65 73 |button..|4).Acces|
|00001f60| 73 20 74 68 65 20 43 68 | 6f 6f 73 65 72 20 64 65 |s the Ch|ooser de|
|00001f70| 73 6b 20 61 63 63 65 73 | 73 6f 72 79 20 61 6e 64 |sk acces|sory and|
|00001f80| 20 63 68 61 6e 67 65 20 | 74 6f 20 61 20 64 69 66 | change |to a dif|
|00001f90| 66 65 72 65 6e 74 20 70 | 72 69 6e 74 65 72 20 64 |ferent p|rinter d|
|00001fa0| 72 69 76 65 72 2e 0d 35 | 29 09 4e 6f 77 20 73 65 |river..5|).Now se|
|00001fb0| 6c 65 63 74 20 52 65 64 | 6f 20 50 61 67 65 20 53 |lect Red|o Page S|
|00001fc0| 65 74 75 70 20 43 68 61 | 6e 67 65 73 20 66 72 6f |etup Cha|nges fro|
|00001fd0| 6d 20 74 68 65 20 45 64 | 69 74 20 6d 65 6e 75 2c |m the Ed|it menu,|
|00001fe0| 20 74 68 65 6e 20 73 65 | 6c 65 63 74 20 55 6e 64 | then se|lect Und|
|00001ff0| 6f 20 50 61 67 65 20 53 | 65 74 75 70 20 43 68 61 |o Page S|etup Cha|
|00002000| 6e 67 65 73 2e 0d 36 29 | 09 4f 70 65 6e 20 74 68 |nges..6)|.Open th|
|00002010| 65 20 50 61 67 65 20 53 | 65 74 75 70 20 64 69 61 |e Page S|etup dia|
|00002020| 6c 6f 67 20 62 6f 78 20 | 66 72 6f 6d 20 74 68 65 |log box |from the|
|00002030| 20 46 69 6c 65 20 6d 65 | 6e 75 20 61 6e 64 20 6e | File me|nu and n|
|00002040| 6f 74 69 63 65 20 74 68 | 61 74 20 74 68 65 20 d2 |otice th|at the .|
|00002050| 6c 61 6e 64 73 63 61 70 | 65 d3 20 70 72 69 6e 74 |landscap|e. print|
|00002060| 69 6e 67 20 69 63 6f 6e | 20 69 73 20 6e 6f 20 6c |ing icon| is no l|
|00002070| 6f 6e 67 65 72 20 68 69 | 67 68 6c 69 67 68 74 65 |onger hi|ghlighte|
|00002080| 64 2e 0d 37 29 09 41 6c | 74 68 6f 75 67 68 20 74 |d..7).Al|though t|
|00002090| 68 65 20 50 61 67 65 20 | 53 65 74 75 70 20 64 69 |he Page |Setup di|
|000020a0| 61 6c 6f 67 20 62 6f 78 | 20 69 73 20 75 6e 61 66 |alog box| is unaf|
|000020b0| 66 65 63 74 65 64 20 62 | 79 20 55 6e 64 6f 20 61 |fected b|y Undo a|
|000020c0| 6e 64 20 52 65 64 6f 2c | 20 74 68 65 20 64 6f 63 |nd Redo,| the doc|
|000020d0| 75 6d 65 6e 74 20 69 74 | 73 65 6c 66 20 69 73 20 |ument it|self is |
|000020e0| 61 66 66 65 63 74 65 64 | 2c 20 61 73 20 69 74 20 |affected|, as it |
|000020f0| 70 72 69 6e 74 73 20 6f | 75 74 20 69 6e 20 6c 61 |prints o|ut in la|
|00002100| 6e 64 73 63 61 70 65 20 | 6d 6f 64 65 2c 20 77 68 |ndscape |mode, wh|
|00002110| 69 6c 65 20 74 68 65 20 | 50 61 67 65 20 53 65 74 |ile the |Page Set|
|00002120| 75 70 20 64 69 61 6c 6f | 67 20 62 6f 78 20 73 68 |up dialo|g box sh|
|00002130| 6f 77 73 20 69 74 20 69 | 73 20 69 6e 20 6e 6f 6e |ows it i|s in non|
|00002140| 2d 6c 61 6e 64 73 63 61 | 70 65 20 6d 6f 64 65 2e |-landsca|pe mode.|
|00002150| 0d 53 6f 6c 75 74 69 6f | 6e 3a 09 41 70 70 6c 65 |.Solutio|n:.Apple|
|00002160| 20 64 6f 65 73 20 6e 6f | 74 20 79 65 74 20 68 61 | does no|t yet ha|
|00002170| 76 65 20 61 20 63 6f 6d | 70 6c 65 74 65 20 73 6f |ve a com|plete so|
|00002180| 6c 75 74 69 6f 6e 20 74 | 6f 20 74 68 69 73 2e 20 |lution t|o this. |
|00002190| 20 49 66 20 69 74 20 62 | 6f 74 68 65 72 73 20 79 | If it b|others y|
|000021a0| 6f 75 2c 20 79 6f 75 20 | 63 6f 75 6c 64 20 6d 6f |ou, you |could mo|
|000021b0| 64 69 66 79 20 49 50 72 | 69 6e 74 53 74 79 6c 65 |dify IPr|intStyle|
|000021c0| 43 68 61 6e 67 65 43 6f | 6d 6d 61 6e 64 20 74 6f |ChangeCo|mmand to|
|000021d0| 20 6d 61 6b 65 20 70 61 | 67 65 20 73 65 74 75 70 | make pa|ge setup|
|000021e0| 20 6e 6f 6e 2d 75 6e 64 | 6f 61 62 6c 65 2e 0d 54 | non-und|oable..T|
|000021f0| 43 6f 6e 74 72 6f 6c 0d | 31 2e 09 4d 61 63 41 70 |Control.|1..MacAp|
|00002200| 70 d5 73 20 73 75 62 63 | 6c 61 73 73 65 73 20 6f |p.s subc|lasses o|
|00002210| 66 20 54 43 6f 6e 74 72 | 6f 6c 20 28 64 65 66 69 |f TContr|ol (defi|
|00002220| 6e 65 64 20 69 6e 20 74 | 68 65 20 66 69 6c 65 20 |ned in t|he file |
|00002230| 55 44 69 61 6c 6f 67 2e | 69 6e 63 31 2e 70 29 20 |UDialog.|inc1.p) |
|00002240| 64 6f 6e d5 74 20 70 61 | 73 73 20 6f 6e 20 74 68 |don.t pa|ss on th|
|00002250| 65 69 72 20 69 74 73 44 | 6f 63 75 6d 65 6e 74 20 |eir itsD|ocument |
|00002260| 70 61 72 61 6d 65 74 65 | 72 20 74 6f 20 74 68 65 |paramete|r to the|
|00002270| 20 49 4e 48 45 52 49 54 | 45 44 20 49 52 65 73 20 | INHERIT|ED IRes |
|00002280| 6d 65 74 68 6f 64 2e 20 | 20 54 68 69 73 20 63 61 |method. | This ca|
|00002290| 75 73 65 73 20 74 68 65 | 20 66 44 6f 63 75 6d 65 |uses the| fDocume|
|000022a0| 6e 74 20 66 69 65 6c 64 | 20 74 6f 20 67 65 74 20 |nt field| to get |
|000022b0| 69 6e 69 74 69 61 6c 69 | 7a 65 64 20 77 69 74 68 |initiali|zed with|
|000022c0| 20 4e 49 4c 20 72 61 74 | 68 65 72 20 74 68 61 6e | NIL rat|her than|
|000022d0| 20 74 68 65 20 54 44 6f | 63 75 6d 65 6e 74 20 72 | the TDo|cument r|
|000022e0| 65 66 65 72 65 6e 63 65 | 2e 0d 53 6f 6c 75 74 69 |eference|..Soluti|
|000022f0| 6f 6e 3a 09 59 6f 75 20 | 63 61 6e 20 6f 76 65 72 |on:.You |can over|
|00002300| 72 69 64 65 20 74 68 65 | 20 49 52 65 73 20 6d 65 |ride the| IRes me|
|00002310| 74 68 6f 64 20 6f 66 20 | 79 6f 75 72 20 6f 77 6e |thod of |your own|
|00002320| 20 63 6f 6e 74 72 6f 6c | 73 20 74 6f 20 64 6f 20 | control|s to do |
|00002330| 61 6e 20 49 4e 48 45 52 | 49 54 45 44 20 49 52 65 |an INHER|ITED IRe|
|00002340| 73 20 61 6e 64 20 74 68 | 65 6e 20 73 65 74 20 74 |s and th|en set t|
|00002350| 68 65 20 66 44 6f 63 75 | 6d 65 6e 74 20 66 69 65 |he fDocu|ment fie|
|00002360| 6c 64 20 74 6f 20 69 74 | 73 44 6f 63 75 6d 65 6e |ld to it|sDocumen|
|00002370| 74 3a 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t:. | |
|00002380| 20 20 20 20 20 20 20 20 | 20 50 52 4f 43 45 44 55 | | PROCEDU|
|00002390| 52 45 20 54 4d 79 42 75 | 74 74 6f 6e 2e 49 52 65 |RE TMyBu|tton.IRe|
|000023a0| 73 28 69 74 73 44 6f 63 | 75 6d 65 6e 74 3a 20 54 |s(itsDoc|ument: T|
|000023b0| 44 6f 63 75 6d 65 6e 74 | 3b 0d 20 20 20 20 20 20 |Document|;. |
|000023c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000023d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000023e0| 20 20 20 20 20 20 20 20 | 20 69 74 73 53 75 70 65 | | itsSupe|
|000023f0| 72 56 69 65 77 3a 20 54 | 56 69 65 77 3b 0d 20 20 |rView: T|View;. |
|00002400| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002410| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 56 41 52 | | VAR|
|00002430| 20 69 74 73 50 61 72 61 | 6d 73 3a 20 50 74 72 29 | itsPara|ms: Ptr)|
|00002440| 3b 20 4f 56 45 52 52 49 | 44 45 3b 0d 20 20 20 20 |; OVERRI|DE;. |
|00002450| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002460| 20 20 20 20 20 20 42 45 | 47 49 4e 0d 20 20 20 20 | BE|GIN. |
|00002470| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002480| 20 20 20 20 20 20 49 4e | 48 45 52 49 54 45 44 20 | IN|HERITED |
|00002490| 49 52 65 73 28 69 74 73 | 44 6f 63 75 6d 65 6e 74 |IRes(its|Document|
|000024a0| 2c 20 69 74 73 53 75 70 | 65 72 56 69 65 77 2c 20 |, itsSup|erView, |
|000024b0| 69 74 73 50 61 72 61 6d | 73 29 3b 0d 20 20 20 20 |itsParam|s);. |
|000024c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000024d0| 20 20 20 20 20 20 66 44 | 6f 63 75 6d 65 6e 74 20 | fD|ocument |
|000024e0| 3a 3d 20 69 74 73 44 6f | 63 75 6d 65 6e 74 3b 0d |:= itsDo|cument;.|
|000024f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002500| 20 20 20 20 20 20 20 20 | 20 20 45 4e 44 3b 0d 09 | | END;..|
|00002510| 54 68 65 6e 20 72 65 67 | 69 73 74 65 72 20 79 6f |Then reg|ister yo|
|00002520| 75 72 20 63 6c 61 73 73 | 20 69 6e 20 79 6f 75 72 |ur class| in your|
|00002530| 20 49 59 6f 75 72 41 70 | 70 6c 69 63 61 74 69 6f | IYourAp|plicatio|
|00002540| 6e 20 6d 65 74 68 6f 64 | 20 73 6f 20 74 68 61 74 |n method| so that|
|00002550| 20 61 6c 6c 20 42 75 74 | 74 6f 6e 20 72 65 66 65 | all But|ton refe|
|00002560| 72 65 6e 63 65 73 20 69 | 6e 20 79 6f 75 72 20 27 |rences i|n your '|
|00002570| 76 69 65 77 27 20 72 65 | 73 6f 75 72 63 65 73 20 |view' re|sources |
|00002580| 72 65 73 75 6c 74 20 69 | 6e 20 54 4d 79 42 75 74 |result i|n TMyBut|
|00002590| 74 6f 6e 73 20 62 65 69 | 6e 67 20 63 72 65 61 74 |tons bei|ng creat|
|000025a0| 65 64 2c 20 72 61 74 68 | 65 72 20 74 68 61 6e 20 |ed, rath|er than |
|000025b0| 54 42 75 74 74 6f 6e 73 | 3a 0d 20 20 20 20 20 20 |TButtons|:. |
|000025c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000025d0| 52 65 67 69 73 74 65 72 | 53 74 64 54 79 70 65 28 |Register|StdType(|
|000025e0| 27 54 4d 79 42 75 74 74 | 6f 6e 27 2c 20 6b 53 74 |'TMyButt|on', kSt|
|000025f0| 64 42 75 74 74 6f 6e 29 | 3b 0d 09 48 6f 77 65 76 |dButton)|;..Howev|
|00002600| 65 72 2c 20 74 68 69 73 | 20 73 6f 6c 75 74 69 6f |er, this| solutio|
|00002610| 6e 20 64 6f 65 73 20 6e | 6f 74 20 77 6f 72 6b 20 |n does n|ot work |
|00002620| 69 66 20 79 6f 75 20 64 | 65 70 65 6e 64 20 6f 6e |if you d|epend on|
|00002630| 20 74 68 65 73 65 20 76 | 69 65 77 73 20 61 70 70 | these v|iews app|
|00002640| 65 61 72 69 6e 67 20 69 | 6e 20 74 68 65 20 64 6f |earing i|n the do|
|00002650| 63 75 6d 65 6e 74 d5 73 | 20 66 56 69 65 77 4c 69 |cument.s| fViewLi|
|00002660| 73 74 2e 0d 46 69 78 3a | 09 52 65 70 6c 61 63 65 |st..Fix:|.Replace|
|00002670| 20 74 68 65 20 63 61 6c | 6c 73 20 74 6f 20 49 4e | the cal|ls to IN|
|00002680| 48 45 52 49 54 45 44 20 | 49 52 65 73 20 69 6e 20 |HERITED |IRes in |
|00002690| 74 68 65 20 49 52 65 73 | 20 6d 65 74 68 6f 64 73 |the IRes| methods|
|000026a0| 20 6f 66 20 73 75 62 63 | 6c 61 73 73 65 73 20 6f | of subc|lasses o|
|000026b0| 66 20 54 43 6f 6e 74 72 | 6f 6c 3a 0d 20 20 20 20 |f TContr|ol:. |
|000026c0| 20 20 20 20 20 20 20 20 | 20 20 49 4e 48 45 52 49 | | INHERI|
|000026d0| 54 45 44 20 49 52 65 73 | 28 4e 49 4c 2c 20 69 74 |TED IRes|(NIL, it|
|000026e0| 73 53 75 70 65 72 56 69 | 65 77 2c 20 69 74 73 50 |sSuperVi|ew, itsP|
|000026f0| 61 72 61 6d 73 29 3b 0d | 09 57 69 74 68 3a 0d 20 |arams);.|.With:. |
|00002700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 49 4e 48 | | INH|
|00002710| 45 52 49 54 45 44 20 49 | 52 65 73 28 69 74 73 44 |ERITED I|Res(itsD|
|00002720| 6f 63 75 6d 65 6e 74 2c | 20 69 74 73 53 75 70 65 |ocument,| itsSupe|
|00002730| 72 56 69 65 77 2c 20 69 | 74 73 50 61 72 61 6d 73 |rView, i|tsParams|
|00002740| 29 3b 0d 32 2e 09 50 72 | 69 6e 74 69 6e 67 20 64 |);.2..Pr|inting d|
|00002750| 69 73 61 62 6c 65 64 20 | 63 6f 6e 74 72 6f 6c 73 |isabled |controls|
|00002760| 2c 20 65 73 70 65 63 69 | 61 6c 6c 79 20 62 75 74 |, especi|ally but|
|00002770| 74 6f 6e 73 2c 20 72 65 | 73 75 6c 74 73 20 69 6e |tons, re|sults in|
|00002780| 20 61 20 67 72 61 79 20 | 70 61 74 74 65 72 6e 20 | a gray |pattern |
|00002790| 62 65 69 6e 67 20 70 72 | 69 6e 74 65 64 20 6f 76 |being pr|inted ov|
|000027a0| 65 72 20 74 68 65 20 63 | 6f 6e 74 72 6f 6c 2e 20 |er the c|ontrol. |
|000027b0| 20 54 68 69 73 20 69 73 | 20 6e 6f 74 20 61 20 62 | This is| not a b|
|000027c0| 75 67 20 69 6e 20 4d 61 | 63 41 70 70 2c 20 62 75 |ug in Ma|cApp, bu|
|000027d0| 74 20 72 61 74 68 65 72 | 20 61 20 6c 69 6d 69 74 |t rather| a limit|
|000027e0| 61 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 4c 61 73 |ation of| the Las|
|000027f0| 65 72 57 72 69 74 65 72 | 2e 20 20 54 68 65 20 4c |erWriter|. The L|
|00002800| 61 73 65 72 57 72 69 74 | 65 72 20 64 72 69 76 65 |aserWrit|er drive|
|00002810| 72 20 64 6f 65 73 6e d5 | 74 20 72 65 73 70 65 63 |r doesn.|t respec|
|00002820| 74 20 61 6c 6c 20 51 75 | 69 63 6b 44 72 61 77 20 |t all Qu|ickDraw |
|00002830| 74 72 61 6e 73 66 65 72 | 20 6d 6f 64 65 73 2c 20 |transfer| modes, |
|00002840| 69 6e 63 6c 75 64 69 6e | 67 20 74 68 65 20 6f 6e |includin|g the on|
|00002850| 65 20 75 73 65 64 20 74 | 6f 20 64 72 61 77 20 74 |e used t|o draw t|
|00002860| 68 65 20 67 72 65 79 20 | 74 65 78 74 2e 0d 53 6f |he grey |text..So|
|00002870| 6c 75 74 69 6f 6e 3a 09 | 4e 6f 74 20 79 65 74 20 |lution:.|Not yet |
|00002880| 64 65 74 65 72 6d 69 6e | 65 64 2e 20 20 49 74 20 |determin|ed. It |
|00002890| 6d 61 79 20 69 6e 76 6f | 6c 76 65 20 69 6d 61 67 |may invo|lve imag|
|000028a0| 69 6e 67 20 74 68 65 20 | 62 75 74 74 6f 6e 20 69 |ing the |button i|
|000028b0| 6e 74 6f 20 61 6e 20 6f | 66 66 2d 73 63 72 65 65 |nto an o|ff-scree|
|000028c0| 6e 20 62 69 74 6d 61 70 | 2c 20 61 6e 64 20 74 68 |n bitmap|, and th|
|000028d0| 65 6e 20 63 6f 70 79 69 | 6e 67 20 69 74 20 74 6f |en copyi|ng it to|
|000028e0| 20 69 74 73 20 64 65 73 | 74 69 6e 61 74 69 6f 6e | its des|tination|
|000028f0| 2e 0d 54 43 74 6c 4d 67 | 72 0d 31 2e 09 46 69 78 |..TCtlMg|r.1..Fix|
|00002900| 65 64 20 69 6e 20 4d 61 | 63 41 70 70 20 32 2e 30 |ed in Ma|cApp 2.0|
|00002910| 2e 31 2e 0d 32 2e 09 46 | 69 78 65 64 20 69 6e 20 |.1..2..F|ixed in |
|00002920| 4d 61 63 41 70 70 20 32 | 2e 30 2e 31 2e 0d 54 44 |MacApp 2|.0.1..TD|
|00002930| 65 73 6b 53 63 72 61 70 | 56 69 65 77 0d 31 2e 09 |eskScrap|View.1..|
|00002940| 46 69 78 65 64 20 69 6e | 20 4d 61 63 41 70 70 20 |Fixed in| MacApp |
|00002950| 32 2e 30 2e 31 2e 0d 54 | 44 69 61 6c 6f 67 56 69 |2.0.1..T|DialogVi|
|00002960| 65 77 0d 31 2e 09 54 44 | 69 61 6c 6f 67 56 69 65 |ew.1..TD|ialogVie|
|00002970| 77 20 63 61 6c 6c 73 20 | 44 6f 43 68 6f 69 63 65 |w calls |DoChoice|
|00002980| 20 6f 6e 20 61 20 64 69 | 73 61 62 6c 65 64 20 62 | on a di|sabled b|
|00002990| 75 74 74 6f 6e 20 61 73 | 20 74 68 65 20 72 65 73 |utton as| the res|
|000029a0| 75 6c 74 20 6f 66 20 61 | 20 6b 65 79 20 70 72 65 |ult of a| key pre|
|000029b0| 73 73 2e 20 20 49 66 20 | 6f 6e 65 20 64 69 73 61 |ss. If |one disa|
|000029c0| 62 6c 65 73 20 74 68 65 | 20 64 65 66 61 75 6c 74 |bles the| default|
|000029d0| 20 62 75 74 74 6f 6e 20 | 61 6e 64 20 70 72 65 73 | button |and pres|
|000029e0| 73 65 73 20 52 65 74 75 | 72 6e 2c 20 66 6f 72 20 |ses Retu|rn, for |
|000029f0| 65 78 61 6d 70 6c 65 2c | 20 74 68 65 20 62 75 74 |example,| the but|
|00002a00| 74 6f 6e d5 73 20 44 6f | 43 68 6f 69 63 65 20 6d |ton.s Do|Choice m|
|00002a10| 65 74 68 6f 64 20 73 74 | 69 6c 6c 20 67 65 74 73 |ethod st|ill gets|
|00002a20| 20 63 61 6c 6c 65 64 2e | 0d 46 69 78 3a 09 54 68 | called.|.Fix:.Th|
|00002a30| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 6c 69 6e 65 |e follow|ing line|
|00002a40| 73 20 6f 66 20 63 6f 64 | 65 20 61 70 70 65 61 72 |s of cod|e appear|
|00002a50| 20 69 6e 20 54 44 69 61 | 6c 6f 67 56 69 65 77 2e | in TDia|logView.|
|00002a60| 44 6f 43 6f 6d 6d 61 6e | 64 4b 65 79 20 61 6e 64 |DoComman|dKey and|
|00002a70| 20 69 6e 20 54 44 69 61 | 6c 6f 67 56 69 65 77 2e | in TDia|logView.|
|00002a80| 44 6f 4b 65 79 43 6f 6d | 6d 61 6e 64 20 28 66 69 |DoKeyCom|mand (fi|
|00002a90| 6c 65 20 55 44 69 61 6c | 6f 67 2e 69 6e 63 31 2e |le UDial|og.inc1.|
|00002aa0| 70 29 3a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |p):. | |
|00002ab0| 20 20 49 46 20 63 61 6e | 63 65 6c 56 69 65 77 2e | IF can|celView.|
|00002ac0| 49 73 56 69 65 77 45 6e | 61 62 6c 65 64 20 54 48 |IsViewEn|abled TH|
|00002ad0| 45 4e 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |EN. | |
|00002ae0| 20 20 20 20 20 54 43 6f | 6e 74 72 6f 6c 28 63 61 | TCo|ntrol(ca|
|00002af0| 6e 63 65 6c 56 69 65 77 | 29 2e 46 6c 61 73 68 3b |ncelView|).Flash;|
|00002b00| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 54 |. | T|
|00002b10| 43 6f 6e 74 72 6f 6c 28 | 63 61 6e 63 65 6c 56 69 |Control(|cancelVi|
|00002b20| 65 77 29 2e 44 6f 43 68 | 6f 69 63 65 28 63 61 6e |ew).DoCh|oice(can|
|00002b30| 63 65 6c 56 69 65 77 2c | 54 43 6f 6e 74 72 6f 6c |celView,|TControl|
|00002b40| 28 63 61 6e 63 65 6c 56 | 69 65 77 29 2e 66 44 65 |(cancelV|iew).fDe|
|00002b50| 66 43 68 6f 69 63 65 29 | 3b 0d 09 52 65 70 6c 61 |fChoice)|;..Repla|
|00002b60| 63 65 20 74 68 65 6d 20 | 77 69 74 68 3a 0d 20 20 |ce them |with:. |
|00002b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 49 46 20 63 | | IF c|
|00002b80| 61 6e 63 65 6c 56 69 65 | 77 2e 49 73 56 69 65 77 |ancelVie|w.IsView|
|00002b90| 45 6e 61 62 6c 65 64 20 | 54 48 45 4e 0d 20 20 20 |Enabled |THEN. |
|00002ba0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 42 | | B|
|00002bb0| 45 47 49 4e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |EGIN. | |
|00002bc0| 20 20 20 20 20 20 20 54 | 43 6f 6e 74 72 6f 6c 28 | T|Control(|
|00002bd0| 63 61 6e 63 65 6c 56 69 | 65 77 29 2e 46 6c 61 73 |cancelVi|ew).Flas|
|00002be0| 68 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h;. | |
|00002bf0| 20 20 20 20 20 54 43 6f | 6e 74 72 6f 6c 28 63 61 | TCo|ntrol(ca|
|00002c00| 6e 63 65 6c 56 69 65 77 | 29 2e 44 6f 43 68 6f 69 |ncelView|).DoChoi|
|00002c10| 63 65 28 63 61 6e 63 65 | 6c 56 69 65 77 2c 0d 20 |ce(cance|lView,. |
|00002c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 54 | | T|
|00002c50| 43 6f 6e 74 72 6f 6c 28 | 63 61 6e 63 65 6c 56 69 |Control(|cancelVi|
|00002c60| 65 77 29 2e 66 44 65 66 | 43 68 6f 69 63 65 29 3b |ew).fDef|Choice);|
|00002c70| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002c80| 20 20 20 45 4e 44 3b 0d | 09 41 64 64 69 74 69 6f | END;.|.Additio|
|00002c90| 6e 61 6c 6c 79 2c 20 69 | 6e 20 54 44 69 61 6c 6f |nally, i|n TDialo|
|00002ca0| 67 56 69 65 77 2e 44 6f | 4b 65 79 43 6f 6d 6d 61 |gView.Do|KeyComma|
|00002cb0| 6e 64 2c 20 72 65 70 6c | 61 63 65 3a 0d 20 20 20 |nd, repl|ace:. |
|00002cc0| 20 20 20 20 20 20 20 20 | 20 20 20 49 46 20 64 65 | | IF de|
|00002cd0| 66 61 75 6c 74 56 69 65 | 77 2e 49 73 56 69 65 77 |faultVie|w.IsView|
|00002ce0| 45 6e 61 62 6c 65 64 20 | 54 48 45 4e 0d 20 20 20 |Enabled |THEN. |
|00002cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 54 | | T|
|00002d00| 43 6f 6e 74 72 6f 6c 28 | 64 65 66 61 75 6c 74 56 |Control(|defaultV|
|00002d10| 69 65 77 29 2e 46 6c 61 | 73 68 3b 0d 20 20 20 20 |iew).Fla|sh;. |
|00002d20| 20 20 20 20 20 20 20 20 | 20 54 43 6f 6e 74 72 6f | | TContro|
|00002d30| 6c 28 64 65 66 61 75 6c | 74 56 69 65 77 29 2e 44 |l(defaul|tView).D|
|00002d40| 6f 43 68 6f 69 63 65 28 | 64 65 66 61 75 6c 74 56 |oChoice(|defaultV|
|00002d50| 69 65 77 2c 54 43 6f 6e | 74 72 6f 6c 28 64 65 66 |iew,TCon|trol(def|
|00002d60| 61 75 6c 74 56 69 65 77 | 29 2e 66 44 65 66 43 68 |aultView|).fDefCh|
|00002d70| 6f 69 63 65 29 3b 0d 09 | 09 52 65 70 6c 61 63 65 |oice);..|.Replace|
|00002d80| 20 74 68 65 6d 20 77 69 | 74 68 3a 0d 20 20 20 20 | them wi|th:. |
|00002d90| 20 20 20 20 20 20 20 20 | 20 20 49 46 20 64 65 66 | | IF def|
|00002da0| 61 75 6c 74 56 69 65 77 | 2e 49 73 56 69 65 77 45 |aultView|.IsViewE|
|00002db0| 6e 61 62 6c 65 64 20 54 | 48 45 4e 0d 20 20 20 20 |nabled T|HEN. |
|00002dc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 42 45 | | BE|
|00002dd0| 47 49 4e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |GIN. | |
|00002de0| 20 20 20 20 20 20 54 43 | 6f 6e 74 72 6f 6c 28 64 | TC|ontrol(d|
|00002df0| 65 66 61 75 6c 74 56 69 | 65 77 29 2e 46 6c 61 73 |efaultVi|ew).Flas|
|00002e00| 68 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h;. | |
|00002e10| 20 20 20 20 20 54 43 6f | 6e 74 72 6f 6c 28 64 65 | TCo|ntrol(de|
|00002e20| 66 61 75 6c 74 56 69 65 | 77 29 2e 44 6f 43 68 6f |faultVie|w).DoCho|
|00002e30| 69 63 65 28 64 65 66 61 | 75 6c 74 56 69 65 77 2c |ice(defa|ultView,|
|00002e40| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00002e50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002e70| 20 20 54 43 6f 6e 74 72 | 6f 6c 28 64 65 66 61 75 | TContr|ol(defau|
|00002e80| 6c 74 56 69 65 77 29 2e | 66 44 65 66 43 68 6f 69 |ltView).|fDefChoi|
|00002e90| 63 65 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |ce);. | |
|00002ea0| 20 20 20 20 20 20 20 45 | 4e 44 3b 0d 53 6f 6c 75 | E|ND;.Solu|
|00002eb0| 74 69 6f 6e 3a 09 59 6f | 75 20 63 61 6e 20 64 6f |tion:.Yo|u can do|
|00002ec0| 20 74 68 69 73 20 61 73 | 20 61 6e 20 4f 56 45 52 | this as| an OVER|
|00002ed0| 52 49 44 45 20 69 66 20 | 79 6f 75 20 68 65 73 69 |RIDE if |you hesi|
|00002ee0| 74 61 74 65 20 74 6f 20 | 63 68 61 6e 67 65 20 4d |tate to |change M|
|00002ef0| 61 63 41 70 70 2e 0d 54 | 44 6f 63 75 6d 65 6e 74 |acApp..T|Document|
|00002f00| 0d 31 2e 09 54 44 6f 63 | 75 6d 65 6e 74 2e 53 61 |.1..TDoc|ument.Sa|
|00002f10| 76 65 20 66 61 69 6c 73 | 20 69 66 20 79 6f 75 20 |ve fails| if you |
|00002f20| 6c 6f 63 6b 20 61 20 66 | 69 6c 65 20 61 66 74 65 |lock a f|ile afte|
|00002f30| 72 20 6f 70 65 6e 69 6e | 67 20 69 74 20 77 69 74 |r openin|g it wit|
|00002f40| 68 20 72 65 61 64 20 61 | 6e 64 20 77 72 69 74 65 |h read a|nd write|
|00002f50| 20 61 63 63 65 73 73 20 | 61 6e 64 20 74 68 65 6e | access |and then|
|00002f60| 20 74 72 79 20 74 6f 20 | 73 61 76 65 2e 20 20 54 | try to |save. T|
|00002f70| 68 65 20 66 69 6c 65 20 | 69 73 20 63 6c 6f 73 65 |he file |is close|
|00002f80| 64 20 61 6e 64 20 66 44 | 61 74 61 52 65 66 4e 75 |d and fD|ataRefNu|
|00002f90| 6d 20 61 6e 64 20 66 52 | 73 72 63 52 65 66 4e 75 |m and fR|srcRefNu|
|00002fa0| 6d 20 63 6f 6e 74 61 69 | 6e 20 74 68 65 69 72 20 |m contai|n their |
|00002fb0| 6f 6c 64 20 28 61 6e 64 | 20 6e 6f 77 20 69 6e 76 |old (and| now inv|
|00002fc0| 61 6c 69 64 29 20 76 61 | 6c 75 65 73 2e 0d 53 6f |alid) va|lues..So|
|00002fd0| 6c 75 74 69 6f 6e 3a 09 | 4e 6f 74 20 79 65 74 20 |lution:.|Not yet |
|00002fe0| 64 65 74 65 72 6d 69 6e | 65 64 2e 0d 32 2e 09 49 |determin|ed..2..I|
|00002ff0| 66 20 47 65 74 46 69 6c | 65 49 6e 66 6f 20 72 65 |f GetFil|eInfo re|
|00003000| 74 75 72 6e 73 20 61 20 | 72 65 73 75 6c 74 20 6f |turns a |result o|
|00003010| 74 68 65 72 20 74 68 61 | 6e 20 6e 6f 45 72 72 2c |ther tha|n noErr,|
|00003020| 20 54 44 6f 63 75 6d 65 | 6e 74 2e 44 69 73 6b 46 | TDocume|nt.DiskF|
|00003030| 69 6c 65 43 68 61 6e 67 | 65 64 20 6d 61 70 73 20 |ileChang|ed maps |
|00003040| 69 74 20 74 6f 20 65 72 | 72 46 69 6c 65 43 68 61 |it to er|rFileCha|
|00003050| 6e 67 65 64 2c 20 62 65 | 63 61 75 73 65 20 74 68 |nged, be|cause th|
|00003060| 65 72 65 20 69 73 20 6e | 6f 20 63 68 65 63 6b 20 |ere is n|o check |
|00003070| 66 6f 72 20 28 65 72 72 | 20 3d 20 6e 6f 45 72 72 |for (err| = noErr|
|00003080| 29 20 69 6e 20 74 68 65 | 20 45 4c 53 45 20 49 46 |) in the| ELSE IF|
|00003090| 20 62 72 61 6e 63 68 2e | 20 20 54 68 65 20 72 65 | branch.| The re|
|000030a0| 73 75 6c 74 69 6e 67 20 | 61 6c 65 72 74 20 69 73 |sulting |alert is|
|000030b0| 20 6d 69 73 6c 65 61 64 | 69 6e 67 2c 20 61 73 20 | mislead|ing, as |
|000030c0| 74 68 65 20 66 69 6c 65 | 20 6d 61 79 20 61 6c 73 |the file| may als|
|000030d0| 6f 20 68 61 76 65 20 62 | 65 65 6e 20 72 65 6e 61 |o have b|een rena|
|000030e0| 6d 65 64 2c 20 64 65 6c | 65 74 65 64 2c 20 6f 72 |med, del|eted, or|
|000030f0| 20 74 68 65 20 66 69 6c | 65 20 73 65 72 76 65 72 | the fil|e server|
|00003100| 20 6d 61 79 20 68 61 76 | 65 20 67 6f 6e 65 20 6f | may hav|e gone o|
|00003110| 66 66 6c 69 6e 65 2e 0d | 46 69 78 3a 09 54 68 65 |ffline..|Fix:.The|
|00003120| 20 65 72 72 6f 72 20 63 | 68 65 63 6b 69 6e 67 20 | error c|hecking |
|00003130| 63 6f 64 65 20 69 6e 20 | 54 44 6f 63 75 6d 65 6e |code in |TDocumen|
|00003140| 74 2e 44 69 73 6b 46 69 | 6c 65 43 68 61 6e 67 65 |t.DiskFi|leChange|
|00003150| 64 20 28 66 69 6c 65 20 | 55 4d 61 63 41 70 70 2e |d (file |UMacApp.|
|00003160| 54 44 6f 63 75 6d 65 6e | 74 2e 70 29 20 73 68 6f |TDocumen|t.p) sho|
|00003170| 75 6c 64 20 6c 6f 6f 6b | 20 6c 69 6b 65 3a 0d 20 |uld look| like:. |
|00003180| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 65 72 72 | | err|
|00003190| 20 3a 3d 20 47 65 74 46 | 69 6c 65 49 6e 66 6f 28 | := GetF|ileInfo(|
|000031a0| 66 54 69 74 6c 65 5e 5e | 2c 20 66 56 6f 6c 52 65 |fTitle^^|, fVolRe|
|000031b0| 66 4e 75 6d 2c 20 70 62 | 29 3b 0d 20 20 20 20 20 |fNum, pb|);. |
|000031c0| 20 20 20 20 20 20 20 20 | 20 2e 2e 2e 0d 20 20 20 | | .... |
|000031d0| 20 20 20 20 20 20 20 20 | 20 20 20 49 46 20 28 65 | | IF (e|
|000031e0| 72 72 20 3d 20 6e 6f 45 | 72 72 29 20 54 48 45 4e |rr = noE|rr) THEN|
|000031f0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00003200| 20 20 20 49 46 20 63 68 | 65 63 6b 54 79 70 65 20 | IF ch|eckType |
|00003210| 26 20 28 70 62 2e 69 6f | 46 6c 46 6e 64 72 49 6e |& (pb.io|FlFndrIn|
|00003220| 66 6f 2e 66 64 54 79 70 | 65 20 3c 3e 20 66 46 69 |fo.fdTyp|e <> fFi|
|00003230| 6c 65 54 79 70 65 29 20 | 54 48 45 4e 0d 20 20 20 |leType) |THEN. |
|00003240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00003250| 20 20 20 65 72 72 20 3a | 3d 20 65 72 72 46 54 79 | err :|= errFTy|
|00003260| 70 65 43 68 61 6e 67 65 | 64 0d 20 20 20 20 20 20 |peChange|d. |
|00003270| 20 20 20 20 20 20 20 20 | 20 20 20 20 45 4c 53 45 | | ELSE|
|00003280| 20 49 46 20 70 62 2e 69 | 6f 46 6c 4d 64 44 61 74 | IF pb.i|oFlMdDat|
|00003290| 20 3c 3e 20 66 4d 6f 64 | 44 61 74 65 20 54 48 45 | <> fMod|Date THE|
|000032a0| 4e 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |N. | |
|000032b0| 20 20 20 20 20 20 20 20 | 65 72 72 20 3a 3d 20 65 | |err := e|
|000032c0| 72 72 46 69 6c 65 43 68 | 61 6e 67 65 64 3b 0d 20 |rrFileCh|anged;. |
|000032d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 44 69 73 | | Dis|
|000032e0| 6b 46 69 6c 65 43 68 61 | 6e 67 65 64 20 3a 3d 20 |kFileCha|nged := |
|000032f0| 65 72 72 3b 0d 33 2e 09 | 49 74 20 69 73 20 6e 6f |err;.3..|It is no|
|00003300| 74 20 70 6f 73 73 69 62 | 6c 65 20 74 6f 20 75 73 |t possib|le to us|
|00003310| 65 20 74 68 65 20 50 61 | 73 63 61 6c 20 62 75 69 |e the Pa|scal bui|
|00003320| 6c 74 2d 69 6e 20 66 69 | 6c 69 6e 67 20 66 75 6e |lt-in fi|ling fun|
|00003330| 63 74 69 6f 6e 20 43 6c | 6f 73 65 20 66 72 6f 6d |ction Cl|ose from|
|00003340| 20 77 69 74 68 69 6e 20 | 61 20 54 44 6f 63 75 6d | within |a TDocum|
|00003350| 65 6e 74 20 6d 65 74 68 | 6f 64 20 62 65 63 61 75 |ent meth|od becau|
|00003360| 73 65 20 74 68 65 20 4f | 62 6a 65 63 74 20 50 61 |se the O|bject Pa|
|00003370| 73 63 61 6c 20 73 63 6f | 70 69 6e 67 20 72 75 6c |scal sco|ping rul|
|00003380| 65 73 20 61 6c 77 61 79 | 73 20 61 73 73 6f 63 69 |es alway|s associ|
|00003390| 61 74 65 20 74 68 65 20 | 6e 61 6d 65 20 43 6c 6f |ate the |name Clo|
|000033a0| 73 65 20 77 69 74 68 20 | 54 44 6f 63 75 6d 65 6e |se with |TDocumen|
|000033b0| 74 2e 43 6c 6f 73 65 2e | 0d 53 6f 6c 75 74 69 6f |t.Close.|.Solutio|
|000033c0| 6e 3a 09 49 74 20 69 73 | 20 6c 69 6b 65 6c 79 20 |n:.It is| likely |
|000033d0| 74 68 61 74 20 41 70 70 | 6c 65 20 77 69 6c 6c 20 |that App|le will |
|000033e0| 63 68 61 6e 67 65 20 74 | 68 65 20 6e 61 6d 65 20 |change t|he name |
|000033f0| 69 6e 20 74 68 65 20 66 | 75 74 75 72 65 2e 20 20 |in the f|uture. |
|00003400| 41 66 74 65 72 20 61 6c | 6c 2c 20 74 68 65 72 65 |After al|l, there|
|00003410| 20 61 72 65 20 74 68 72 | 65 65 20 64 69 73 74 69 | are thr|ee disti|
|00003420| 6e 63 74 20 6f 62 6a 65 | 63 74 73 20 74 68 61 74 |nct obje|cts that|
|00003430| 20 69 6d 70 6c 65 6d 65 | 6e 74 20 61 20 43 6c 6f | impleme|nt a Clo|
|00003440| 73 65 20 6d 65 74 68 6f | 64 2c 20 6e 6f 6e 65 20 |se metho|d, none |
|00003450| 6f 66 20 77 68 69 63 68 | 20 68 61 76 65 20 61 6e |of which| have an|
|00003460| 79 20 72 65 6c 61 74 69 | 6f 6e 20 74 6f 20 61 6e |y relati|on to an|
|00003470| 6f 74 68 65 72 3b 20 73 | 6f 6d 65 74 68 69 6e 67 |other; s|omething|
|00003480| 20 6c 69 6b 65 20 74 68 | 61 74 20 6e 65 65 64 73 | like th|at needs|
|00003490| 20 74 6f 20 62 65 20 63 | 6c 65 61 6e 65 64 20 75 | to be c|leaned u|
|000034a0| 70 2e 20 20 49 6e 20 74 | 68 65 20 6d 65 61 6e 74 |p. In t|he meant|
|000034b0| 69 6d 65 2c 20 79 6f 75 | 20 63 6f 75 6c 64 20 6d |ime, you| could m|
|000034c0| 61 6b 65 20 61 20 67 6c | 6f 62 61 6c 20 72 6f 75 |ake a gl|obal rou|
|000034d0| 74 69 6e 65 20 4d 79 43 | 6c 6f 73 65 20 74 68 61 |tine MyC|lose tha|
|000034e0| 74 20 77 6f 75 6c 64 20 | 62 65 20 61 20 77 72 61 |t would |be a wra|
|000034f0| 70 70 65 72 20 66 6f 72 | 20 74 68 65 20 43 6c 6f |pper for| the Clo|
|00003500| 73 65 20 72 6f 75 74 69 | 6e 65 2e 0d 54 45 64 69 |se routi|ne..TEdi|
|00003510| 74 54 65 78 74 0d 31 2e | 09 49 66 20 74 68 65 20 |tText.1.|.If the |
|00003520| 66 69 72 73 74 20 6f 72 | 20 6f 6e 6c 79 20 54 45 |first or| only TE|
|00003530| 64 69 74 54 65 78 74 20 | 69 6e 20 61 20 64 69 61 |ditText |in a dia|
|00003540| 6c 6f 67 20 68 61 73 20 | 61 75 74 6f 2d 77 72 61 |log has |auto-wra|
|00003550| 70 20 74 75 72 6e 65 64 | 20 6f 6e 20 61 6e 64 20 |p turned| on and |
|00003560| 69 73 20 6e 6f 74 20 69 | 6e 69 74 69 61 6c 6c 79 |is not i|nitially|
|00003570| 20 73 65 6c 65 63 74 65 | 64 2c 20 74 61 62 62 69 | selecte|d, tabbi|
|00003580| 6e 67 20 74 6f 20 69 74 | 20 61 66 74 65 72 20 6f |ng to it| after o|
|00003590| 70 65 6e 69 6e 67 20 74 | 68 65 20 77 69 6e 64 6f |pening t|he windo|
|000035a0| 77 20 73 65 6c 65 63 74 | 73 20 69 74 2c 20 62 75 |w select|s it, bu|
|000035b0| 74 20 74 68 65 20 73 65 | 6c 65 63 74 69 6f 6e 20 |t the se|lection |
|000035c0| 69 73 20 6e 6f 74 20 76 | 69 73 69 62 6c 65 20 75 |is not v|isible u|
|000035d0| 6e 74 69 6c 20 74 68 65 | 20 77 69 6e 64 6f 77 20 |ntil the| window |
|000035e0| 69 73 20 72 65 66 72 65 | 73 68 65 64 2e 20 20 54 |is refre|shed. T|
|000035f0| 68 69 73 20 64 6f 65 73 | 20 6e 6f 74 20 6f 63 63 |his does| not occ|
|00003600| 75 72 20 69 66 20 61 75 | 74 6f 2d 77 72 61 70 20 |ur if au|to-wrap |
|00003610| 69 73 20 74 75 72 6e 65 | 64 20 6f 66 66 20 66 6f |is turne|d off fo|
|00003620| 72 20 74 68 61 74 20 54 | 45 64 69 74 54 65 78 74 |r that T|EditText|
|00003630| 2e 0d 53 6f 6c 75 74 69 | 6f 6e 3a 09 4e 6f 74 20 |..Soluti|on:.Not |
|00003640| 79 65 74 20 64 65 74 65 | 72 6d 69 6e 65 64 2e 0d |yet dete|rmined..|
|00003650| 32 2e 09 54 45 64 69 74 | 54 65 78 74 20 69 74 65 |2..TEdit|Text ite|
|00003660| 6d 73 20 69 6e 20 54 44 | 69 61 6c 6f 67 56 69 65 |ms in TD|ialogVie|
|00003670| 77 73 20 6e 6f 20 6c 6f | 6e 67 65 72 20 67 65 74 |ws no lo|nger get|
|00003680| 20 74 68 65 20 66 69 72 | 73 74 20 63 72 61 63 6b | the fir|st crack|
|00003690| 20 61 74 20 65 76 65 6e | 74 73 2c 20 61 73 20 74 | at even|ts, as t|
|000036a0| 68 65 79 20 75 73 65 64 | 20 74 6f 20 69 6e 20 4d |hey used| to in M|
|000036b0| 61 63 41 70 70 20 32 2e | 30 62 39 2e 20 20 54 68 |acApp 2.|0b9. Th|
|000036c0| 65 20 65 76 65 6e 74 20 | 68 61 6e 64 6c 65 72 20 |e event |handler |
|000036d0| 63 68 61 69 6e 20 69 73 | 20 6e 6f 77 20 67 54 61 |chain is| now gTa|
|000036e0| 72 67 65 74 20 2d 3e 20 | 54 44 69 61 6c 6f 67 54 |rget -> |TDialogT|
|000036f0| 45 56 69 65 77 20 2d 3e | 20 54 53 63 72 6f 6c 6c |EView ->| TScroll|
|00003700| 65 72 20 2d 3e 20 54 45 | 64 69 74 54 65 78 74 20 |er -> TE|ditText |
|00003710| 2d 3e 20 54 44 69 61 6c | 6f 67 56 69 65 77 20 2d |-> TDial|ogView -|
|00003720| 3e 20 65 74 63 2e 2c 20 | 73 6f 20 61 6c 6c 20 65 |> etc., |so all e|
|00003730| 76 65 6e 74 73 20 69 6e | 20 77 68 69 63 68 20 61 |vents in| which a|
|00003740| 20 73 75 62 63 6c 61 73 | 73 20 6f 66 20 54 45 64 | subclas|s of TEd|
|00003750| 69 74 54 65 78 74 20 6d | 69 67 68 74 20 62 65 20 |itText m|ight be |
|00003760| 69 6e 74 65 72 65 73 74 | 65 64 20 61 72 65 20 63 |interest|ed are c|
|00003770| 61 75 67 68 74 20 62 79 | 20 54 44 69 61 6c 6f 67 |aught by| TDialog|
|00003780| 54 45 56 69 65 77 2e 0d | 53 6f 6c 75 74 69 6f 6e |TEView..|Solution|
|00003790| 3a 09 43 72 65 61 74 65 | 20 79 6f 75 72 20 6f 77 |:.Create| your ow|
|000037a0| 6e 20 73 75 62 63 6c 61 | 73 73 20 6f 66 20 54 44 |n subcla|ss of TD|
|000037b0| 69 61 6c 6f 67 54 45 56 | 69 65 77 20 74 68 61 74 |ialogTEV|iew that|
|000037c0| 20 68 61 6e 64 6c 65 73 | 20 74 68 65 20 69 6e 74 | handles| the int|
|000037d0| 65 72 65 73 74 69 6e 67 | 20 63 68 61 72 61 63 74 |eresting| charact|
|000037e0| 65 72 73 20 62 79 20 6f | 76 65 72 72 69 64 69 6e |ers by o|verridin|
|000037f0| 67 20 54 44 69 61 6c 6f | 67 56 69 65 77 2e 4d 61 |g TDialo|gView.Ma|
|00003800| 6b 65 54 45 56 69 65 77 | 20 61 6e 64 20 72 65 74 |keTEView| and ret|
|00003810| 75 72 6e 69 6e 67 20 79 | 6f 75 72 20 6f 77 6e 20 |urning y|our own |
|00003820| 73 75 62 63 6c 61 73 73 | 20 6f 66 20 54 44 69 61 |subclass| of TDia|
|00003830| 6c 6f 67 54 45 56 69 65 | 77 2e 0d 46 69 78 3a 09 |logTEVie|w..Fix:.|
|00003840| 41 20 63 6c 65 61 6e 20 | 66 69 78 20 74 6f 20 74 |A clean |fix to t|
|00003850| 68 69 73 20 70 72 6f 62 | 6c 65 6d 20 6d 69 67 68 |his prob|lem migh|
|00003860| 74 20 62 65 20 74 6f 20 | 72 65 61 72 72 61 6e 67 |t be to |rearrang|
|00003870| 65 20 74 68 65 20 65 76 | 65 6e 74 20 68 61 6e 64 |e the ev|ent hand|
|00003880| 6c 65 72 20 63 68 61 69 | 6e 20 74 6f 20 67 54 61 |ler chai|n to gTa|
|00003890| 72 67 65 74 20 2d 3e 20 | 54 45 64 69 74 54 65 78 |rget -> |TEditTex|
|000038a0| 74 20 2d 3e 20 54 44 69 | 61 6c 6f 67 54 45 56 69 |t -> TDi|alogTEVi|
|000038b0| 65 77 20 2d 3e 20 54 53 | 63 72 6f 6c 6c 65 72 20 |ew -> TS|croller |
|000038c0| 2d 3e 20 54 44 69 61 6c | 6f 67 56 69 65 77 20 2d |-> TDial|ogView -|
|000038d0| 3e 20 65 74 63 2e 20 20 | 48 6f 77 65 76 65 72 2c |> etc. |However,|
|000038e0| 20 74 68 69 73 20 61 70 | 70 72 6f 61 63 68 20 69 | this ap|proach i|
|000038f0| 73 20 6d 6f 72 65 20 77 | 6f 72 6b 20 66 6f 72 20 |s more w|ork for |
|00003900| 54 44 69 61 6c 6f 67 54 | 45 56 69 65 77 2e 49 6e |TDialogT|EView.In|
|00003910| 73 74 61 6c 6c 45 64 69 | 74 54 65 78 74 2c 20 61 |stallEdi|tText, a|
|00003920| 6e 64 20 74 68 65 20 65 | 66 66 65 63 74 73 20 6f |nd the e|ffects o|
|00003930| 66 20 72 65 61 72 72 61 | 6e 67 69 6e 67 20 74 68 |f rearra|nging th|
|00003940| 65 20 74 61 72 67 65 74 | 20 63 68 61 69 6e 20 61 |e target| chain a|
|00003950| 72 65 20 63 75 72 72 65 | 6e 74 6c 79 20 75 6e 74 |re curre|ntly unt|
|00003960| 65 73 74 65 64 2e 0d 54 | 45 76 74 48 61 6e 64 6c |ested..T|EvtHandl|
|00003970| 65 72 0d 31 2e 09 54 45 | 76 74 48 61 6e 64 6c 65 |er.1..TE|vtHandle|
|00003980| 72 2e 44 6f 43 72 65 61 | 74 65 56 69 65 77 73 20 |r.DoCrea|teViews |
|00003990| 6e 6f 77 20 63 61 6c 6c | 73 20 54 56 69 65 77 2e |now call|s TView.|
|000039a0| 41 64 6a 75 73 74 53 69 | 7a 65 20 6f 6e 20 74 68 |AdjustSi|ze on th|
|000039b0| 65 20 72 6f 6f 74 20 76 | 69 65 77 20 69 74 20 6a |e root v|iew it j|
|000039c0| 75 73 74 20 63 72 65 61 | 74 65 64 2e 20 20 54 68 |ust crea|ted. Th|
|000039d0| 69 73 20 63 68 61 6e 67 | 65 20 77 61 73 20 6d 61 |is chang|e was ma|
|000039e0| 64 65 20 74 6f 20 67 69 | 76 65 20 76 69 65 77 73 |de to gi|ve views|
|000039f0| 20 61 6e 20 65 61 72 6c | 79 20 63 68 61 6e 63 65 | an earl|y chance|
|00003a00| 20 74 6f 20 6d 61 6b 65 | 20 73 75 72 65 20 74 68 | to make| sure th|
|00003a10| 65 79 20 61 72 65 20 63 | 6f 72 72 65 63 74 6c 79 |ey are c|orrectly|
|00003a20| 20 73 69 7a 65 64 2e 20 | 20 48 6f 77 65 76 65 72 | sized. | However|
|00003a30| 2c 20 74 68 65 20 63 68 | 61 6e 67 65 20 63 61 6e |, the ch|ange can|
|00003a40| 20 63 61 75 73 65 20 79 | 6f 75 72 20 61 70 70 6c | cause y|our appl|
|00003a50| 69 63 61 74 69 6f 6e 20 | 74 6f 20 62 72 65 61 6b |ication |to break|
|00003a60| 20 69 66 20 79 6f 75 20 | 6f 76 65 72 72 69 64 65 | if you |override|
|00003a70| 20 72 6f 75 74 69 6e 65 | 73 20 74 68 61 74 20 70 | routine|s that p|
|00003a80| 65 72 66 6f 72 6d 20 41 | 64 6a 75 73 74 53 69 7a |erform A|djustSiz|
|00003a90| 65 20 63 61 6c 6c 73 20 | 28 6c 69 6b 65 20 54 56 |e calls |(like TV|
|00003aa0| 69 65 77 2e 43 61 6c 63 | 4d 69 6e 53 69 7a 65 29 |iew.Calc|MinSize)|
|00003ab0| 20 61 6e 64 20 74 68 6f | 73 65 20 72 6f 75 74 69 | and tho|se routi|
|00003ac0| 6e 65 73 20 72 65 6c 79 | 20 6f 6e 20 69 6e 66 6f |nes rely| on info|
|00003ad0| 72 6d 61 74 69 6f 6e 20 | 74 68 61 74 20 69 73 20 |rmation |that is |
|00003ae0| 6e 6f 74 20 69 6e 69 74 | 69 61 6c 69 7a 65 64 20 |not init|ialized |
|00003af0| 75 6e 74 69 6c 20 61 66 | 74 65 72 20 44 6f 43 72 |until af|ter DoCr|
|00003b00| 65 61 74 65 56 69 65 77 | 73 20 72 65 74 75 72 6e |eateView|s return|
|00003b10| 73 20 74 6f 20 54 59 6f | 75 72 44 6f 63 75 6d 65 |s to TYo|urDocume|
|00003b20| 6e 74 2e 44 6f 4d 61 6b | 65 56 69 65 77 73 2e 0d |nt.DoMak|eViews..|
|00003b30| 53 6f 6c 75 74 69 6f 6e | 3a 09 53 69 6d 70 6c 79 |Solution|:.Simply|
|00003b40| 20 62 65 20 61 77 61 72 | 65 20 6f 66 20 74 68 69 | be awar|e of thi|
|00003b50| 73 20 63 68 61 6e 67 65 | 2e 20 20 49 66 20 79 6f |s change|. If yo|
|00003b60| 75 20 69 6e 69 74 69 61 | 6c 69 7a 65 20 66 69 65 |u initia|lize fie|
|00003b70| 6c 64 73 20 6f 66 20 79 | 6f 75 72 20 76 69 65 77 |lds of y|our view|
|00003b80| 73 20 69 6e 20 79 6f 75 | 72 20 44 6f 4d 61 6b 65 |s in you|r DoMake|
|00003b90| 56 69 65 77 73 20 6d 65 | 74 68 6f 64 2c 20 74 68 |Views me|thod, th|
|00003ba0| 65 6e 20 6f 76 65 72 72 | 69 64 65 73 20 6f 66 20 |en overr|ides of |
|00003bb0| 6d 65 74 68 6f 64 73 20 | 73 75 63 68 20 61 73 20 |methods |such as |
|00003bc0| 54 56 69 65 77 2e 52 65 | 73 69 7a 65 2c 20 54 56 |TView.Re|size, TV|
|00003bd0| 69 65 77 2e 43 6f 6d 70 | 75 74 65 53 69 7a 65 2c |iew.Comp|uteSize,|
|00003be0| 20 61 6e 64 20 54 56 69 | 65 77 2e 43 61 6c 63 4d | and TVi|ew.CalcM|
|00003bf0| 69 6e 53 69 7a 65 20 73 | 68 6f 75 6c 64 20 74 61 |inSize s|hould ta|
|00003c00| 6b 65 20 69 6e 74 6f 20 | 61 63 63 6f 75 6e 74 20 |ke into |account |
|00003c10| 74 68 61 74 20 74 68 65 | 73 65 20 66 69 65 6c 64 |that the|se field|
|00003c20| 73 20 6d 61 79 20 6e 6f | 74 20 79 65 74 20 62 65 |s may no|t yet be|
|00003c30| 20 69 6e 69 74 69 61 6c | 69 7a 65 64 2e 20 20 41 | initial|ized. A|
|00003c40| 74 20 74 68 65 20 76 65 | 72 79 20 6c 65 61 73 74 |t the ve|ry least|
|00003c50| 2c 20 54 59 6f 75 72 56 | 69 65 77 2e 49 52 65 73 |, TYourV|iew.IRes|
|00003c60| 20 73 68 6f 75 6c 64 20 | 73 65 74 20 74 68 65 73 | should |set thes|
|00003c70| 65 20 66 69 65 6c 64 73 | 20 74 6f 20 4e 49 4c 2e |e fields| to NIL.|
|00003c80| 0d 54 47 72 69 64 56 69 | 65 77 0d 31 2e 09 41 74 |.TGridVi|ew.1..At|
|00003c90| 74 65 6d 70 74 69 6e 67 | 20 74 6f 20 73 65 6c 65 |tempting| to sele|
|00003ca0| 63 74 20 61 20 54 47 72 | 69 64 56 69 65 77 63 65 |ct a TGr|idViewce|
|00003cb0| 6c 6c 20 66 6f 72 20 77 | 68 69 63 68 20 43 61 6e |ll for w|hich Can|
|00003cc0| 53 65 6c 65 63 74 43 65 | 6c 6c 20 72 65 74 75 72 |SelectCe|ll retur|
|00003cd0| 6e 73 20 46 41 4c 53 45 | 20 63 61 75 73 65 73 20 |ns FALSE| causes |
|00003ce0| 74 68 65 20 63 75 72 72 | 65 6e 74 20 73 65 6c 65 |the curr|ent sele|
|00003cf0| 63 74 69 6f 6e 20 74 6f | 20 62 65 20 64 65 73 65 |ction to| be dese|
|00003d00| 6c 65 63 74 65 64 2e 0d | 53 6f 6c 75 74 69 6f 6e |lected..|Solution|
|00003d10| 3a 09 4f 76 65 72 72 69 | 64 65 20 54 47 72 69 64 |:.Overri|de TGrid|
|00003d20| 56 69 65 77 2e 44 6f 4d | 6f 75 73 65 43 6f 6d 6d |View.DoM|ouseComm|
|00003d30| 61 6e 64 20 74 6f 20 63 | 61 6c 6c 20 49 64 65 6e |and to c|all Iden|
|00003d40| 74 69 66 79 50 6f 69 6e | 74 2e 20 20 49 66 20 61 |tifyPoin|t. If a|
|00003d50| 20 76 61 6c 69 64 20 63 | 65 6c 6c 20 69 73 20 72 | valid c|ell is r|
|00003d60| 65 74 75 72 6e 65 64 2c | 20 63 61 6c 6c 20 43 61 |eturned,| call Ca|
|00003d70| 6e 53 65 6c 65 63 74 43 | 65 6c 6c 2e 20 20 49 66 |nSelectC|ell. If|
|00003d80| 20 69 74 20 72 65 74 75 | 72 6e 73 20 54 52 55 45 | it retu|rns TRUE|
|00003d90| 2c 20 63 61 6c 6c 20 49 | 4e 48 45 52 49 54 45 44 |, call I|NHERITED|
|00003da0| 20 44 6f 4d 6f 75 73 65 | 43 6f 6d 6d 61 6e 64 2e | DoMouse|Command.|
|00003db0| 20 20 54 68 69 73 20 69 | 6e 68 69 62 69 74 73 20 | This i|nhibits |
|00003dc0| 61 6c 6c 20 74 72 61 63 | 6b 69 6e 67 20 69 66 20 |all trac|king if |
|00003dd0| 74 68 65 20 75 73 65 72 | 20 69 6e 69 74 69 61 6c |the user| initial|
|00003de0| 6c 79 20 63 6c 69 63 6b | 73 20 69 6e 20 61 20 64 |ly click|s in a d|
|00003df0| 69 73 61 62 6c 65 64 20 | 63 65 6c 6c 2e 0d 46 69 |isabled |cell..Fi|
|00003e00| 78 3a 09 52 65 70 6c 61 | 63 65 20 74 68 65 20 66 |x:.Repla|ce the f|
|00003e10| 6f 6c 6c 6f 77 69 6e 67 | 20 6c 69 6e 65 20 69 6e |ollowing| line in|
|00003e20| 20 54 43 65 6c 6c 53 65 | 6c 65 63 74 43 6f 6d 6d | TCellSe|lectComm|
|00003e30| 61 6e 64 2e 54 72 61 63 | 6b 4d 6f 75 73 65 20 28 |and.Trac|kMouse (|
|00003e40| 66 69 6c 65 20 55 47 72 | 69 64 56 69 65 77 2e 69 |file UGr|idView.i|
|00003e50| 6e 63 31 2e 70 29 3a 0d | 20 20 20 20 20 20 20 20 |nc1.p):.| |
|00003e60| 20 20 20 20 20 20 49 46 | 20 4c 4f 4e 47 49 4e 54 | IF| LONGINT|
|00003e70| 28 63 6c 69 63 6b 65 64 | 43 65 6c 6c 29 20 3c 3e |(clicked|Cell) <>|
|00003e80| 20 4c 4f 4e 47 49 4e 54 | 28 66 50 72 65 76 43 65 | LONGINT|(fPrevCe|
|00003e90| 6c 6c 29 0d 09 57 69 74 | 68 3a 0d 20 20 20 20 20 |ll)..Wit|h:. |
|00003ea0| 20 20 20 20 20 20 20 20 | 20 49 46 20 28 4c 4f 4e | | IF (LON|
|00003eb0| 47 49 4e 54 28 63 6c 69 | 63 6b 65 64 43 65 6c 6c |GINT(cli|ckedCell|
|00003ec0| 29 20 3c 3e 20 4c 4f 4e | 47 49 4e 54 28 66 50 72 |) <> LON|GINT(fPr|
|00003ed0| 65 76 43 65 6c 6c 29 29 | 0d 20 20 20 20 20 20 20 |evCell))|. |
|00003ee0| 20 20 20 20 20 20 20 20 | 20 26 20 66 47 72 69 64 | | & fGrid|
|00003ef0| 56 69 65 77 2e 43 61 6e | 53 65 6c 65 63 74 43 65 |View.Can|SelectCe|
|00003f00| 6c 6c 28 63 6c 69 63 6b | 65 64 43 65 6c 6c 29 0d |ll(click|edCell).|
|00003f10| 32 2e 09 46 69 78 65 64 | 20 69 6e 20 4d 61 63 41 |2..Fixed| in MacA|
|00003f20| 70 70 20 32 2e 30 2e 31 | 2e 0d 33 2e 09 54 47 72 |pp 2.0.1|..3..TGr|
|00003f30| 69 64 56 69 65 77 2e 44 | 72 61 77 43 65 6c 6c 20 |idView.D|rawCell |
|00003f40| 69 73 20 63 61 6c 6c 65 | 64 20 77 69 74 68 20 74 |is calle|d with t|
|00003f50| 68 65 20 63 6c 69 70 20 | 72 65 67 69 6f 6e 20 73 |he clip |region s|
|00003f60| 65 74 20 77 69 64 65 20 | 6f 70 65 6e 2c 20 77 68 |et wide |open, wh|
|00003f70| 69 63 68 20 61 6c 6c 6f | 77 73 20 61 6e 79 20 6f |ich allo|ws any o|
|00003f80| 76 65 72 72 69 64 65 20 | 6f 66 20 44 72 61 77 43 |verride |of DrawC|
|00003f90| 65 6c 6c 20 74 6f 20 64 | 72 61 77 20 61 6e 79 77 |ell to d|raw anyw|
|00003fa0| 68 65 72 65 20 77 69 74 | 68 69 6e 20 74 68 65 20 |here wit|hin the |
|00003fb0| 54 47 72 69 64 56 69 65 | 77 2e 20 20 49 74 20 69 |TGridVie|w. It i|
|00003fc0| 73 20 6c 69 6b 65 6c 79 | 20 74 68 61 74 20 74 68 |s likely| that th|
|00003fd0| 69 73 20 69 73 20 6e 6f | 74 20 64 65 73 69 72 65 |is is no|t desire|
|00003fe0| 64 2c 20 61 6e 64 20 74 | 68 65 20 72 65 73 70 6f |d, and t|he respo|
|00003ff0| 6e 73 69 62 69 6c 69 74 | 79 20 66 6f 72 20 63 6c |nsibilit|y for cl|
|00004000| 69 70 70 69 6e 67 20 63 | 6f 75 6c 64 20 62 65 20 |ipping c|ould be |
|00004010| 61 64 64 65 64 20 74 6f | 20 54 47 72 69 64 56 69 |added to| TGridVi|
|00004020| 65 77 2e 0d 46 69 78 3a | 09 49 6e 20 54 47 72 69 |ew..Fix:|.In TGri|
|00004030| 64 56 69 65 77 2e 44 72 | 61 77 52 61 6e 67 65 4f |dView.Dr|awRangeO|
|00004040| 66 43 65 6c 6c 73 20 28 | 66 69 6c 65 20 55 47 72 |fCells (|file UGr|
|00004050| 69 64 56 69 65 77 2e 69 | 6e 63 31 2e 70 29 2c 20 |idView.i|nc1.p), |
|00004060| 61 64 64 20 61 20 6c 6f | 63 61 6c 20 52 67 6e 48 |add a lo|cal RgnH|
|00004070| 61 6e 64 6c 65 20 63 61 | 6c 6c 65 64 20 6f 6c 64 |andle ca|lled old|
|00004080| 43 6c 69 70 2e 20 20 49 | 6e 69 74 69 61 6c 69 7a |Clip. I|nitializ|
|00004090| 65 20 6f 6c 64 43 6c 69 | 70 20 77 69 74 68 20 74 |e oldCli|p with t|
|000040a0| 68 65 20 66 6f 6c 6c 6f | 77 69 6e 67 20 6c 69 6e |he follo|wing lin|
|000040b0| 65 73 20 61 74 20 74 68 | 65 20 62 65 67 69 6e 6e |es at th|e beginn|
|000040c0| 69 6e 67 20 6f 66 20 74 | 68 65 20 6d 65 74 68 6f |ing of t|he metho|
|000040d0| 64 3a 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d:. | |
|000040e0| 20 6f 6c 64 43 6c 69 70 | 20 3a 3d 20 4d 61 6b 65 | oldClip| := Make|
|000040f0| 4e 65 77 52 67 6e 3b 0d | 20 20 20 20 20 20 20 20 |NewRgn;.| |
|00004100| 20 20 20 20 20 20 47 65 | 74 43 6c 69 70 28 6f 6c | Ge|tClip(ol|
|00004110| 64 43 6c 69 70 29 3b 0d | 09 4e 65 78 74 2c 20 63 |dClip);.|.Next, c|
|00004120| 6c 69 70 20 74 6f 20 74 | 68 65 20 63 75 72 72 65 |lip to t|he curre|
|00004130| 6e 74 20 63 65 6c 6c 20 | 62 79 20 61 64 64 69 6e |nt cell |by addin|
|00004140| 67 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |g the fo|llowing |
|00004150| 6c 69 6e 65 73 20 62 65 | 66 6f 72 65 20 74 68 65 |lines be|fore the|
|00004160| 20 6c 69 6e 65 20 74 68 | 61 74 20 73 61 79 73 20 | line th|at says |
|00004170| 61 43 65 6c 6c 2e 68 20 | 3a 3d 20 69 3a 0d 20 20 |aCell.h |:= i:. |
|00004180| 20 20 20 20 20 20 20 20 | 20 20 20 20 7b 24 49 46 | | {$IF|
|00004190| 43 20 71 44 65 62 75 67 | 7d 0d 20 20 20 20 20 20 |C qDebug|}. |
|000041a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 55 73 65 54 | | UseT|
|000041b0| 65 6d 70 52 67 6e 28 27 | 54 47 72 69 64 56 69 65 |empRgn('|TGridVie|
|000041c0| 77 2e 44 72 61 77 52 61 | 6e 67 65 4f 66 43 65 6c |w.DrawRa|ngeOfCel|
|000041d0| 6c 73 27 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |ls');. | |
|000041e0| 20 20 20 20 7b 24 45 4e | 44 43 7d 0d 20 20 20 20 | {$EN|DC}. |
|000041f0| 20 20 20 20 20 20 20 20 | 20 20 52 65 63 74 52 67 | | RectRg|
|00004200| 6e 28 67 54 65 6d 70 52 | 67 6e 2c 20 61 51 44 52 |n(gTempR|gn, aQDR|
|00004210| 65 63 74 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |ect);. | |
|00004220| 20 20 20 20 53 65 63 74 | 52 67 6e 28 6f 6c 64 43 | Sect|Rgn(oldC|
|00004230| 6c 69 70 2c 20 67 54 65 | 6d 70 52 67 6e 2c 20 67 |lip, gTe|mpRgn, g|
|00004240| 54 65 6d 70 52 67 6e 29 | 3b 0d 20 20 20 20 20 20 |TempRgn)|;. |
|00004250| 20 20 20 20 20 20 20 20 | 53 65 74 43 6c 69 70 28 | |SetClip(|
|00004260| 67 54 65 6d 70 52 67 6e | 29 3b 0d 20 20 20 20 20 |gTempRgn|);. |
|00004270| 20 20 20 20 20 20 20 20 | 20 7b 24 49 46 43 20 71 | | {$IFC q|
|00004280| 44 65 62 75 67 7d 0d 20 | 20 20 20 20 20 20 20 20 |Debug}. | |
|00004290| 20 20 20 20 20 20 20 20 | 20 44 6f 6e 65 57 69 74 | | DoneWit|
|000042a0| 68 54 65 6d 70 52 67 6e | 3b 0d 20 20 20 20 20 20 |hTempRgn|;. |
|000042b0| 20 20 20 20 20 20 20 20 | 7b 24 45 4e 44 43 7d 0d | |{$ENDC}.|
|000042c0| 09 46 69 6e 61 6c 6c 79 | 2c 20 61 64 64 20 74 68 |.Finally|, add th|
|000042d0| 65 20 66 6f 6c 6c 6f 77 | 69 6e 67 20 6c 69 6e 65 |e follow|ing line|
|000042e0| 73 20 61 74 20 74 68 65 | 20 65 6e 64 20 6f 66 20 |s at the| end of |
|000042f0| 74 68 65 20 6d 65 74 68 | 6f 64 3a 0d 20 20 20 20 |the meth|od:. |
|00004300| 20 20 20 20 20 20 20 20 | 20 20 53 65 74 43 6c 69 | | SetCli|
|00004310| 70 28 6f 6c 64 43 6c 69 | 70 29 3b 0d 20 20 20 20 |p(oldCli|p);. |
|00004320| 20 20 20 20 20 20 20 20 | 20 20 44 69 73 70 6f 73 | | Dispos|
|00004330| 65 52 67 6e 28 6f 6c 64 | 43 6c 69 70 29 3b 0d 54 |eRgn(old|Clip);.T|
|00004340| 49 63 6f 6e 0d 31 2e 09 | 46 69 78 65 64 20 69 6e |Icon.1..|Fixed in|
|00004350| 20 4d 61 63 41 70 70 20 | 32 2e 30 2e 31 2e 0d 54 | MacApp |2.0.1..T|
|00004360| 4c 69 73 74 0d 31 2e 09 | 49 66 20 79 6f 75 20 68 |List.1..|If you h|
|00004370| 61 76 65 20 61 20 54 4c | 69 73 74 20 73 75 62 63 |ave a TL|ist subc|
|00004380| 6c 61 73 73 20 77 69 74 | 68 20 61 20 53 74 72 69 |lass wit|h a Stri|
|00004390| 6e 67 20 69 6e 73 74 61 | 6e 63 65 20 76 61 72 69 |ng insta|nce vari|
|000043a0| 61 62 6c 65 2c 20 69 74 | 20 69 73 20 6e 6f 74 20 |able, it| is not |
|000043b0| 70 6f 73 73 69 62 6c 65 | 20 74 6f 20 75 73 65 20 |possible| to use |
|000043c0| 74 68 65 20 50 61 73 63 | 61 6c 20 73 74 72 69 6e |the Pasc|al strin|
|000043d0| 67 20 62 75 69 6c 74 2d | 69 6e 20 66 75 6e 63 74 |g built-|in funct|
|000043e0| 69 6f 6e 20 44 65 6c 65 | 74 65 20 6f 6e 20 69 74 |ion Dele|te on it|
|000043f0| 20 62 65 63 61 75 73 65 | 20 74 68 65 20 4f 62 6a | because| the Obj|
|00004400| 65 63 74 20 50 61 73 63 | 61 6c 20 73 63 6f 70 69 |ect Pasc|al scopi|
|00004410| 6e 67 20 72 75 6c 65 73 | 20 61 6c 77 61 79 73 20 |ng rules| always |
|00004420| 61 73 73 6f 63 69 61 74 | 65 20 74 68 65 20 6e 61 |associat|e the na|
|00004430| 6d 65 20 44 65 6c 65 74 | 65 20 77 69 74 68 20 54 |me Delet|e with T|
|00004440| 4c 69 73 74 2e 44 65 6c | 65 74 65 2e 0d 53 6f 6c |List.Del|ete..Sol|
|00004450| 75 74 69 6f 6e 3a 09 41 | 70 70 6c 65 20 77 69 6c |ution:.A|pple wil|
|00004460| 6c 20 63 68 61 6e 67 65 | 20 74 68 65 20 6e 61 6d |l change| the nam|
|00004470| 65 20 69 6e 20 74 68 65 | 20 66 75 74 75 72 65 2e |e in the| future.|
|00004480| 20 20 49 6e 20 74 68 65 | 20 6d 65 61 6e 74 69 6d | In the| meantim|
|00004490| 65 2c 20 79 6f 75 20 63 | 6f 75 6c 64 20 6d 61 6b |e, you c|ould mak|
|000044a0| 65 20 61 20 67 6c 6f 62 | 61 6c 20 72 6f 75 74 69 |e a glob|al routi|
|000044b0| 6e 65 20 4d 79 44 65 6c | 65 74 65 20 74 68 61 74 |ne MyDel|ete that|
|000044c0| 20 77 6f 75 6c 64 20 62 | 65 20 61 20 77 72 61 70 | would b|e a wrap|
|000044d0| 70 65 72 20 66 6f 72 20 | 74 68 65 20 73 74 72 69 |per for |the stri|
|000044e0| 6e 67 20 44 65 6c 65 74 | 65 20 72 6f 75 74 69 6e |ng Delet|e routin|
|000044f0| 65 2e 0d 54 4e 75 6d 62 | 65 72 54 65 78 74 0d 31 |e..TNumb|erText.1|
|00004500| 2e 09 57 68 65 6e 20 74 | 68 65 20 6c 65 6e 67 74 |..When t|he lengt|
|00004510| 68 20 6f 66 20 74 68 65 | 20 74 65 78 74 20 69 6e |h of the| text in|
|00004520| 20 61 20 54 4e 75 6d 62 | 65 72 54 65 78 74 20 69 | a TNumb|erText i|
|00004530| 6e 73 74 61 6e 63 65 20 | 69 73 20 30 2c 20 47 65 |nstance |is 0, Ge|
|00004540| 74 56 61 6c 75 65 20 72 | 65 74 75 72 6e 73 20 30 |tValue r|eturns 0|
|00004550| 2c 20 61 6e 64 20 56 61 | 6c 69 64 61 74 65 20 72 |, and Va|lidate r|
|00004560| 65 74 75 72 6e 73 20 6b | 56 61 6c 69 64 56 61 6c |eturns k|ValidVal|
|00004570| 75 65 2e 20 20 54 68 65 | 20 76 61 6c 75 65 20 69 |ue. The| value i|
|00004580| 73 20 6e 6f 74 20 63 68 | 65 63 6b 65 64 20 61 67 |s not ch|ecked ag|
|00004590| 61 69 6e 73 74 20 66 4d | 69 6e 69 6d 75 6d 20 6f |ainst fM|inimum o|
|000045a0| 72 20 66 4d 61 78 69 6d | 75 6d 2c 20 73 6f 20 79 |r fMaxim|um, so y|
|000045b0| 6f 75 72 20 61 70 70 6c | 69 63 61 74 69 6f 6e 20 |our appl|ication |
|000045c0| 6d 61 79 20 62 65 20 66 | 65 64 20 77 69 74 68 20 |may be f|ed with |
|000045d0| 61 20 76 61 6c 75 65 20 | 69 74 20 69 73 20 6e 6f |a value |it is no|
|000045e0| 74 20 70 72 65 70 61 72 | 65 64 20 74 6f 20 68 61 |t prepar|ed to ha|
|000045f0| 6e 64 6c 65 2e 0d 46 69 | 78 3a 09 49 64 65 61 73 |ndle..Fi|x:.Ideas|
|00004600| 20 66 6f 72 20 73 6f 6c | 75 74 69 6f 6e 73 20 6f | for sol|utions o|
|00004610| 72 20 66 69 78 65 73 20 | 61 72 65 20 6f 75 74 6c |r fixes |are outl|
|00004620| 69 6e 65 64 20 69 6e 20 | 74 68 65 20 63 6f 6d 6d |ined in |the comm|
|00004630| 65 6e 74 20 69 6e 20 54 | 4e 75 6d 62 65 72 54 65 |ent in T|NumberTe|
|00004640| 78 74 2e 56 61 6c 69 64 | 61 74 65 20 28 66 69 6c |xt.Valid|ate (fil|
|00004650| 65 20 55 44 69 61 6c 6f | 67 2e 69 6e 63 31 2e 70 |e UDialo|g.inc1.p|
|00004660| 29 2e 0d 54 50 6f 70 75 | 70 0d 31 2e 09 46 69 78 |)..TPopu|p.1..Fix|
|00004670| 65 64 20 69 6e 20 4d 61 | 63 41 70 70 20 32 2e 30 |ed in Ma|cApp 2.0|
|00004680| 2e 31 2e 0d 32 2e 09 46 | 69 78 65 64 20 69 6e 20 |.1..2..F|ixed in |
|00004690| 4d 61 63 41 70 70 20 32 | 2e 30 2e 31 2e 0d 33 2e |MacApp 2|.0.1..3.|
|000046a0| 09 46 69 78 65 64 20 69 | 6e 20 4d 61 63 41 70 70 |.Fixed i|n MacApp|
|000046b0| 20 32 2e 30 2e 31 2e 0d | 34 2e 09 54 50 6f 70 75 | 2.0.1..|4..TPopu|
|000046c0| 70 20 6e 6f 20 6c 6f 6e | 67 65 72 20 63 61 6c 6c |p no lon|ger call|
|000046d0| 73 20 44 6f 43 68 6f 69 | 63 65 20 69 66 20 74 68 |s DoChoi|ce if th|
|000046e0| 65 20 73 61 6d 65 20 69 | 74 65 6d 20 69 73 20 72 |e same i|tem is r|
|000046f0| 65 73 65 6c 65 63 74 65 | 64 2e 0d 46 69 78 3a 09 |eselecte|d..Fix:.|
|00004700| 49 6e 20 54 50 6f 70 75 | 70 2e 44 6f 4d 6f 75 73 |In TPopu|p.DoMous|
|00004710| 65 43 6f 6d 6d 61 6e 64 | 20 28 66 69 6c 65 20 55 |eCommand| (file U|
|00004720| 44 69 61 6c 6f 67 2e 69 | 6e 63 31 2e 70 29 20 69 |Dialog.i|nc1.p) i|
|00004730| 73 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |s the fo|llowing |
|00004740| 6c 69 6e 65 3a 0d 20 20 | 20 20 20 20 20 20 20 20 |line:. | |
|00004750| 20 20 20 20 49 46 20 28 | 48 69 57 6f 72 64 28 72 | IF (|HiWord(r|
|00004760| 65 73 75 6c 74 29 20 3c | 3e 20 30 29 20 26 20 28 |esult) <|> 0) & (|
|00004770| 6e 65 77 43 68 6f 69 63 | 65 20 3c 3e 20 66 43 75 |newChoic|e <> fCu|
|00004780| 72 72 65 6e 74 49 74 65 | 6d 29 20 54 48 45 4e 0d |rrentIte|m) THEN.|
|00004790| 09 52 65 6d 6f 76 65 20 | 74 68 65 20 d2 26 20 28 |.Remove |the .& (|
|000047a0| 6e 65 77 43 68 6f 69 63 | 65 20 3c 3e 20 66 43 75 |newChoic|e <> fCu|
|000047b0| 72 72 65 6e 74 49 74 65 | 6d 29 d3 20 70 61 72 74 |rrentIte|m). part|
|000047c0| 2e 0d 35 2e 09 54 50 6f | 70 75 70 2e 53 65 74 43 |..5..TPo|pup.SetC|
|000047d0| 75 72 72 65 6e 74 49 74 | 65 6d 20 6e 65 69 74 68 |urrentIt|em neith|
|000047e0| 65 72 20 72 65 73 74 6f | 72 65 73 20 74 68 65 20 |er resto|res the |
|000047f0| 70 6f 72 74 20 63 6f 6c | 6f 72 73 20 63 6f 72 72 |port col|ors corr|
|00004800| 65 63 74 6c 79 20 6e 6f | 72 20 75 73 65 73 20 74 |ectly no|r uses t|
|00004810| 68 65 20 72 69 67 68 74 | 20 72 65 63 74 61 6e 67 |he right| rectang|
|00004820| 6c 65 20 74 6f 20 6f 62 | 74 61 69 6e 20 74 68 65 |le to ob|tain the|
|00004830| 20 6d 65 6e 75 20 63 6f | 6c 6f 72 73 20 66 6f 72 | menu co|lors for|
|00004840| 20 74 68 65 20 70 6f 70 | 75 70 20 62 6f 78 2e 0d | the pop|up box..|
|00004850| 46 69 78 3a 09 49 6e 20 | 54 50 6f 70 75 70 2e 53 |Fix:.In |TPopup.S|
|00004860| 65 74 43 75 72 72 65 6e | 74 49 74 65 6d 20 28 66 |etCurren|tItem (f|
|00004870| 69 6c 65 20 55 44 69 61 | 6c 6f 67 2e 69 6e 63 31 |ile UDia|log.inc1|
|00004880| 2e 70 29 2c 20 64 65 63 | 6c 61 72 65 20 74 68 65 |.p), dec|lare the|
|00004890| 20 66 6f 6c 6c 6f 77 69 | 6e 67 20 74 77 6f 20 6e | followi|ng two n|
|000048a0| 65 77 20 6c 6f 63 61 6c | 20 76 61 72 69 61 62 6c |ew local| variabl|
|000048b0| 65 73 3a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |es:. | |
|000048c0| 20 20 6e 65 77 46 43 6f | 6c 6f 72 3a 20 20 20 20 | newFCo|lor: |
|000048d0| 20 20 20 20 20 20 20 20 | 20 20 20 52 47 42 43 6f | | RGBCo|
|000048e0| 6c 6f 72 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |lor;. | |
|000048f0| 20 20 20 6e 65 77 42 6b | 43 6f 6c 6f 72 3a 20 20 | newBk|Color: |
|00004900| 20 20 20 20 20 20 20 20 | 20 20 20 20 52 47 42 43 | | RGBC|
|00004910| 6f 6c 6f 72 3b 0d 09 54 | 68 65 6e 2c 20 72 65 70 |olor;..T|hen, rep|
|00004920| 6c 61 63 65 3a 0d 20 20 | 20 20 20 20 20 20 20 20 |lace:. | |
|00004930| 20 20 20 20 49 46 20 72 | 65 64 72 61 77 20 26 20 | IF r|edraw & |
|00004940| 46 6f 63 75 73 20 26 20 | 49 73 56 69 73 69 62 6c |Focus & |IsVisibl|
|00004950| 65 20 54 48 45 4e 0d 20 | 20 20 20 20 20 20 20 20 |e THEN. | |
|00004960| 20 20 20 20 20 20 20 20 | 20 42 45 47 49 4e 0d 20 | | BEGIN. |
|00004970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004980| 20 47 65 74 51 44 45 78 | 74 65 6e 74 28 6d 65 6e | GetQDEx|tent(men|
|00004990| 75 52 65 63 74 29 3b 0d | 20 20 20 20 20 20 20 20 |uRect);.| |
|000049a0| 20 20 20 20 20 20 20 20 | 20 20 47 65 74 4d 65 6e | | GetMen|
|000049b0| 75 43 6f 6c 6f 72 73 28 | 6d 65 6e 75 52 65 63 74 |uColors(|menuRect|
|000049c0| 2c 20 66 4d 65 6e 75 49 | 44 2c 20 69 74 65 6d 2c |, fMenuI|D, item,|
|000049d0| 20 6e 65 77 46 43 6f 6c | 6f 72 2c 20 6e 65 77 42 | newFCol|or, newB|
|000049e0| 6b 43 6f 6c 6f 72 29 3b | 0d 20 20 20 20 20 20 20 |kColor);|. |
|000049f0| 20 20 20 20 20 20 20 20 | 20 20 20 53 65 74 49 66 | | SetIf|
|00004a00| 43 6f 6c 6f 72 28 6e 65 | 77 46 43 6f 6c 6f 72 29 |Color(ne|wFColor)|
|00004a10| 3b 20 53 65 74 49 66 42 | 6b 43 6f 6c 6f 72 28 6e |; SetIfB|kColor(n|
|00004a20| 65 77 42 6b 43 6f 6c 6f | 72 29 3b 0d 20 20 20 20 |ewBkColo|r);. |
|00004a30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 44 72 | | Dr|
|00004a40| 61 77 50 6f 70 75 70 42 | 6f 78 28 6d 65 6e 75 52 |awPopupB|ox(menuR|
|00004a50| 65 63 74 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |ect);. | |
|00004a60| 20 20 20 20 20 20 20 20 | 45 4e 44 3b 0d 09 57 69 | |END;..Wi|
|00004a70| 74 68 3a 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |th:. | |
|00004a80| 20 20 49 46 20 72 65 64 | 72 61 77 20 26 20 46 6f | IF red|raw & Fo|
|00004a90| 63 75 73 20 26 20 49 73 | 56 69 73 69 62 6c 65 20 |cus & Is|Visible |
|00004aa0| 54 48 45 4e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |THEN. | |
|00004ab0| 20 20 20 20 20 20 20 42 | 45 47 49 4e 0d 20 20 20 | B|EGIN. |
|00004ac0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 47 | | G|
|00004ad0| 65 74 49 66 43 6f 6c 6f | 72 28 6f 6c 64 46 43 6f |etIfColo|r(oldFCo|
|00004ae0| 6c 6f 72 29 3b 20 47 65 | 74 49 66 42 6b 43 6f 6c |lor); Ge|tIfBkCol|
|00004af0| 6f 72 28 6f 6c 64 42 6b | 43 6f 6c 6f 72 29 3b 0d |or(oldBk|Color);.|
|00004b00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004b10| 20 20 43 61 6c 63 4d 65 | 6e 75 52 65 63 74 28 6d | CalcMe|nuRect(m|
|00004b20| 65 6e 75 52 65 63 74 29 | 3b 0d 20 20 20 20 20 20 |enuRect)|;. |
|00004b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 47 65 74 4d | | GetM|
|00004b40| 65 6e 75 43 6f 6c 6f 72 | 73 28 6d 65 6e 75 52 65 |enuColor|s(menuRe|
|00004b50| 63 74 2c 20 66 4d 65 6e | 75 49 44 2c 20 66 43 75 |ct, fMen|uID, fCu|
|00004b60| 72 72 65 6e 74 49 74 65 | 6d 2c 0d 20 20 20 20 20 |rrentIte|m,. |
|00004b70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004b80| 20 20 20 20 20 20 20 20 | 20 20 20 6e 65 77 46 43 | | newFC|
|00004b90| 6f 6c 6f 72 2c 20 6e 65 | 77 42 6b 43 6f 6c 6f 72 |olor, ne|wBkColor|
|00004ba0| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |);. | |
|00004bb0| 20 20 20 20 20 53 65 74 | 49 66 43 6f 6c 6f 72 28 | Set|IfColor(|
|00004bc0| 6e 65 77 46 43 6f 6c 6f | 72 29 3b 20 53 65 74 49 |newFColo|r); SetI|
|00004bd0| 66 42 6b 43 6f 6c 6f 72 | 28 6e 65 77 42 6b 43 6f |fBkColor|(newBkCo|
|00004be0| 6c 6f 72 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |lor);. | |
|00004bf0| 20 20 20 20 20 20 20 20 | 44 72 61 77 50 6f 70 75 | |DrawPopu|
|00004c00| 70 42 6f 78 28 6d 65 6e | 75 52 65 63 74 29 3b 0d |pBox(men|uRect);.|
|00004c10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004c20| 20 20 7b 20 52 65 73 65 | 74 20 63 6f 6c 6f 72 73 | { Rese|t colors|
|00004c30| 20 74 6f 20 74 68 65 69 | 72 20 6f 72 69 67 69 6e | to thei|r origin|
|00004c40| 61 6c 20 73 74 61 74 65 | 20 7d 0d 20 20 20 20 20 |al state| }. |
|00004c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 53 65 74 | | Set|
|00004c60| 49 66 43 6f 6c 6f 72 28 | 6f 6c 64 46 43 6f 6c 6f |IfColor(|oldFColo|
|00004c70| 72 29 3b 20 53 65 74 49 | 66 42 6b 43 6f 6c 6f 72 |r); SetI|fBkColor|
|00004c80| 28 6f 6c 64 42 6b 43 6f | 6c 6f 72 29 3b 0d 20 20 |(oldBkCo|lor);. |
|00004c90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004ca0| 45 4e 44 3b 0d 54 53 63 | 72 6f 6c 6c 65 72 0d 31 |END;.TSc|roller.1|
|00004cb0| 2e 09 54 53 63 72 6f 6c | 6c 65 72 2e 52 65 76 65 |..TScrol|ler.Reve|
|00004cc0| 61 6c 52 65 63 74 20 64 | 6f 65 73 6e d5 74 20 63 |alRect d|oesn.t c|
|00004cd0| 61 6c 6c 20 49 4e 48 45 | 52 49 54 45 44 20 52 65 |all INHE|RITED Re|
|00004ce0| 76 65 61 6c 52 65 63 74 | 2e 20 20 54 68 69 73 20 |vealRect|. This |
|00004cf0| 68 61 73 20 69 6d 70 6c | 69 63 61 74 69 6f 6e 73 |has impl|ications|
|00004d00| 20 69 6e 20 73 69 74 75 | 61 74 69 6f 6e 73 20 77 | in situ|ations w|
|00004d10| 68 65 72 65 20 79 6f 75 | 20 68 61 76 65 20 6e 65 |here you| have ne|
|00004d20| 73 74 65 64 20 73 63 72 | 6f 6c 6c 65 72 73 2e 20 |sted scr|ollers. |
|00004d30| 20 49 66 2c 20 66 6f 72 | 20 65 78 61 6d 70 6c 65 | If, for| example|
|00004d40| 2c 20 79 6f 75 20 72 75 | 6e 20 44 65 6d 6f 44 69 |, you ru|n DemoDi|
|00004d50| 61 6c 6f 67 73 2c 20 73 | 65 6c 65 63 74 20 74 68 |alogs, s|elect th|
|00004d60| 65 20 66 69 72 73 74 20 | 6d 65 6e 75 20 69 74 65 |e first |menu ite|
|00004d70| 6d 2c 20 70 72 65 73 73 | 20 74 68 65 20 54 61 62 |m, press| the Tab|
|00004d80| 20 6b 65 79 2c 20 74 68 | 65 6e 20 62 65 67 69 6e | key, th|en begin|
|00004d90| 20 74 79 70 69 6e 67 2c | 20 74 68 65 20 54 45 64 | typing,| the TEd|
|00004da0| 69 74 54 65 78 74 20 69 | 74 65 6d 20 79 6f 75 20 |itText i|tem you |
|00004db0| 61 72 65 20 6d 6f 64 69 | 66 79 69 6e 67 20 69 73 |are modi|fying is|
|00004dc0| 20 6e 6f 74 20 73 63 72 | 6f 6c 6c 65 64 20 69 6e | not scr|olled in|
|00004dd0| 74 6f 20 76 69 65 77 2e | 20 20 54 68 69 73 20 69 |to view.| This i|
|00004de0| 73 20 62 65 63 61 75 73 | 65 20 77 68 69 6c 65 20 |s becaus|e while |
|00004df0| 79 6f 75 72 20 73 65 6c | 65 63 74 69 6f 6e 20 69 |your sel|ection i|
|00004e00| 73 20 72 65 76 65 61 6c | 65 64 20 77 69 74 68 69 |s reveal|ed withi|
|00004e10| 6e 20 74 68 65 20 63 6f | 6e 74 65 78 74 20 6f 66 |n the co|ntext of|
|00004e20| 20 74 68 65 20 54 45 64 | 69 74 54 65 78 74 2c 20 | the TEd|itText, |
|00004e30| 74 68 65 20 54 45 64 69 | 74 54 65 78 74 20 69 74 |the TEdi|tText it|
|00004e40| 65 6d 20 69 74 73 65 6c | 66 20 69 73 20 6e 6f 74 |em itsel|f is not|
|00004e50| 20 73 63 72 6f 6c 6c 65 | 64 20 69 6e 74 6f 20 76 | scrolle|d into v|
|00004e60| 69 65 77 2e 0d 46 69 78 | 3a 09 41 64 64 20 61 6e |iew..Fix|:.Add an|
|00004e70| 20 49 4e 48 45 52 49 54 | 45 44 20 52 65 76 65 61 | INHERIT|ED Revea|
|00004e80| 6c 52 65 63 74 20 63 61 | 6c 6c 20 74 6f 20 54 53 |lRect ca|ll to TS|
|00004e90| 63 72 6f 6c 6c 65 72 2e | 52 65 76 65 61 6c 52 65 |croller.|RevealRe|
|00004ea0| 63 74 20 28 66 69 6c 65 | 20 55 4d 61 63 41 70 70 |ct (file| UMacApp|
|00004eb0| 2e 54 53 63 72 6f 6c 6c | 65 72 2e 70 29 3a 0d 20 |.TScroll|er.p):. |
|00004ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 50 52 4f | | PRO|
|00004ed0| 43 45 44 55 52 45 20 54 | 53 63 72 6f 6c 6c 65 72 |CEDURE T|Scroller|
|00004ee0| 2e 52 65 76 65 61 6c 52 | 65 63 74 28 2e 2e 2e 29 |.RevealR|ect(...)|
|00004ef0| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00004f00| 20 20 20 20 42 45 47 49 | 4e 0d 20 20 20 20 20 20 | BEGI|N. |
|00004f10| 20 20 20 20 20 20 20 20 | 20 20 20 20 2e 2e 2e 0d | | ....|
|00004f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00004f30| 20 20 53 63 72 6f 6c 6c | 42 79 28 64 65 6c 74 61 | Scroll|By(delta|
|00004f40| 2e 68 2c 20 64 65 6c 74 | 61 2e 76 2c 20 72 65 64 |.h, delt|a.v, red|
|00004f50| 72 61 77 29 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |raw);. | |
|00004f60| 20 20 20 20 20 20 20 20 | 4f 66 66 73 65 74 56 52 | |OffsetVR|
|00004f70| 65 63 74 28 72 65 63 74 | 54 6f 52 65 76 65 61 6c |ect(rect|ToReveal|
|00004f80| 2c 20 2d 66 54 72 61 6e | 73 6c 61 74 69 6f 6e 2e |, -fTran|slation.|
|00004f90| 68 2c 20 2d 66 54 72 61 | 6e 73 6c 61 74 69 6f 6e |h, -fTra|nslation|
|00004fa0| 2e 76 29 3b 0d 20 20 20 | 20 20 20 20 20 20 20 20 |.v);. | |
|00004fb0| 20 20 20 20 20 20 20 49 | 4e 48 45 52 49 54 45 44 | I|NHERITED|
|00004fc0| 20 52 65 76 65 61 6c 52 | 65 63 74 28 72 65 63 74 | RevealR|ect(rect|
|00004fd0| 54 6f 52 65 76 65 61 6c | 2c 20 6d 69 6e 54 6f 53 |ToReveal|, minToS|
|00004fe0| 65 65 2c 20 72 65 64 72 | 61 77 29 3b 20 7b 20 61 |ee, redr|aw); { a|
|00004ff0| 64 64 20 74 68 69 73 20 | 6c 69 6e 65 20 7d 0d 20 |dd this |line }. |
|00005000| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005010| 20 45 4e 44 3b 0d 54 53 | 74 64 50 72 69 6e 74 48 | END;.TS|tdPrintH|
|00005020| 61 6e 64 6c 65 72 0d 31 | 2e 09 41 6e 20 65 78 74 |andler.1|..An ext|
|00005030| 72 61 20 62 6c 61 6e 6b | 20 70 61 67 65 20 69 73 |ra blank| page is|
|00005040| 20 70 72 69 6e 74 65 64 | 20 69 66 20 54 53 74 64 | printed| if TStd|
|00005050| 50 72 69 6e 74 48 61 6e | 64 6c 65 72 2e 66 46 69 |PrintHan|dler.fFi|
|00005060| 78 65 64 53 69 7a 65 50 | 61 67 65 73 20 3d 20 46 |xedSizeP|ages = F|
|00005070| 41 4c 53 45 20 61 6e 64 | 20 66 53 69 7a 65 44 65 |ALSE and| fSizeDe|
|00005080| 74 65 72 6d 69 6e 65 72 | 20 3d 20 73 69 7a 65 46 |terminer| = sizeF|
|00005090| 69 6c 6c 50 61 67 65 73 | 2e 20 20 54 68 69 73 20 |illPages|. This |
|000050a0| 69 73 20 62 65 63 61 75 | 73 65 20 54 56 69 65 77 |is becau|se TView|
|000050b0| 2e 43 6f 6d 70 75 74 65 | 53 69 7a 65 20 63 6f 6d |.Compute|Size com|
|000050c0| 70 75 74 65 73 20 74 68 | 65 20 76 69 65 77 d5 73 |putes th|e view.s|
|000050d0| 20 73 69 7a 65 20 61 73 | 20 61 20 6d 75 6c 74 69 | size as| a multi|
|000050e0| 70 6c 65 20 6f 66 20 74 | 68 65 20 70 72 69 6e 74 |ple of t|he print|
|000050f0| 61 62 6c 65 20 70 61 67 | 65 20 73 69 7a 65 20 66 |able pag|e size f|
|00005100| 6f 72 20 73 69 7a 65 46 | 69 6c 6c 50 61 67 65 73 |or sizeF|illPages|
|00005110| 2c 20 69 67 6e 6f 72 69 | 6e 67 20 74 68 61 74 20 |, ignori|ng that |
|00005120| 74 68 65 20 76 69 65 77 | 20 6e 65 65 64 20 6e 6f |the view| need no|
|00005130| 74 20 75 73 65 20 74 68 | 65 20 66 75 6c 6c 20 73 |t use th|e full s|
|00005140| 69 7a 65 20 6f 66 20 65 | 61 63 68 20 70 61 67 65 |ize of e|ach page|
|00005150| 2e 0d 53 6f 6c 75 74 69 | 6f 6e 3a 09 41 6c 77 61 |..Soluti|on:.Alwa|
|00005160| 79 73 20 73 65 74 20 62 | 6f 74 68 20 42 6f 6f 6c |ys set b|oth Bool|
|00005170| 65 61 6e 20 63 6f 6d 70 | 6f 6e 65 6e 74 73 20 6f |ean comp|onents o|
|00005180| 66 20 66 46 69 78 65 64 | 53 69 7a 65 50 61 67 65 |f fFixed|SizePage|
|00005190| 73 20 74 6f 20 54 52 55 | 45 2e 20 20 54 68 65 73 |s to TRU|E. Thes|
|000051a0| 65 20 61 72 65 20 69 6e | 69 74 69 61 6c 69 7a 65 |e are in|itialize|
|000051b0| 64 20 66 72 6f 6d 20 74 | 68 65 20 6c 61 73 74 20 |d from t|he last |
|000051c0| 74 77 6f 20 70 61 72 61 | 6d 65 74 65 72 73 20 79 |two para|meters y|
|000051d0| 6f 75 20 70 61 73 73 20 | 74 6f 20 49 53 74 64 50 |ou pass |to IStdP|
|000051e0| 72 69 6e 74 48 61 6e 64 | 6c 65 72 2e 0d 53 6f 6c |rintHand|ler..Sol|
|000051f0| 75 74 69 6f 6e 3a 09 55 | 73 65 20 66 53 69 7a 65 |ution:.U|se fSize|
|00005200| 44 65 74 65 72 6d 69 6e | 65 72 20 3d 20 73 69 7a |Determin|er = siz|
|00005210| 65 56 61 72 69 61 62 6c | 65 2e 0d 32 2e 09 53 69 |eVariabl|e..2..Si|
|00005220| 6d 70 6c 79 20 75 73 69 | 6e 67 20 74 68 65 20 6e |mply usi|ng the n|
|00005230| 61 6b 65 64 20 44 49 56 | 20 6f 70 65 72 61 74 6f |aked DIV| operato|
|00005240| 72 20 66 6f 72 20 73 63 | 61 6c 69 6e 67 20 74 68 |r for sc|aling th|
|00005250| 65 4d 61 72 67 69 6e 73 | 20 69 6e 20 54 53 74 64 |eMargins| in TStd|
|00005260| 50 72 69 6e 74 48 61 6e | 64 6c 65 72 2e 43 68 65 |PrintHan|dler.Che|
|00005270| 63 6b 50 72 69 6e 74 65 | 72 20 69 6e 74 72 6f 64 |ckPrinte|r introd|
|00005280| 75 63 65 73 20 72 6f 75 | 6e 64 69 6e 67 20 65 72 |uces rou|nding er|
|00005290| 72 6f 72 73 2e 20 20 54 | 68 65 73 65 20 65 72 72 |rors. T|hese err|
|000052a0| 6f 72 73 20 6d 61 79 20 | 62 65 20 64 69 73 74 75 |ors may |be distu|
|000052b0| 72 62 69 6e 67 20 69 66 | 20 79 6f 75 20 6e 65 65 |rbing if| you nee|
|000052c0| 64 20 70 72 65 63 69 73 | 65 20 63 6f 6e 74 72 6f |d precis|e contro|
|000052d0| 6c 20 6f 76 65 72 20 74 | 68 65 20 6d 61 72 67 69 |l over t|he margi|
|000052e0| 6e 73 20 75 73 65 64 20 | 66 6f 72 20 70 72 69 6e |ns used |for prin|
|000052f0| 74 69 6e 67 2e 0d 46 69 | 78 3a 09 49 6e 73 65 72 |ting..Fi|x:.Inser|
|00005300| 74 20 74 68 65 20 66 6f | 6c 6c 6f 77 69 6e 67 20 |t the fo|llowing |
|00005310| 6c 6f 63 61 6c 20 70 72 | 6f 63 65 64 75 72 65 20 |local pr|ocedure |
|00005320| 69 6e 20 54 53 74 64 50 | 72 69 6e 74 48 61 6e 64 |in TStdP|rintHand|
|00005330| 6c 65 72 2e 43 68 65 63 | 6b 50 72 69 6e 74 65 72 |ler.Chec|kPrinter|
|00005340| 20 28 66 69 6c 65 20 55 | 50 72 69 6e 74 69 6e 67 | (file U|Printing|
|00005350| 2e 69 6e 63 31 2e 70 29 | 3a 0d 20 20 20 20 20 20 |.inc1.p)|:. |
|00005360| 20 20 20 20 20 20 20 20 | 46 55 4e 43 54 49 4f 4e | |FUNCTION|
|00005370| 20 53 63 61 6c 65 49 6e | 74 65 67 65 72 28 74 68 | ScaleIn|teger(th|
|00005380| 65 56 61 6c 75 65 2c 20 | 74 68 65 4d 75 6c 74 69 |eValue, |theMulti|
|00005390| 70 6c 69 65 72 2c 20 74 | 68 65 44 69 76 69 73 6f |plier, t|heDiviso|
|000053a0| 72 3a 20 49 6e 74 65 67 | 65 72 29 3a 20 49 6e 74 |r: Integ|er): Int|
|000053b0| 65 67 65 72 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |eger;. | |
|000053c0| 20 20 20 20 20 20 20 20 | 56 41 52 0d 20 20 20 20 | |VAR. |
|000053d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000053e0| 20 20 69 6e 74 65 72 6d | 65 64 69 61 74 65 3a 20 | interm|ediate: |
|000053f0| 4c 6f 6e 67 69 6e 74 3b | 0d 20 20 20 20 20 20 20 |Longint;|. |
|00005400| 20 20 20 20 20 20 20 20 | 20 20 20 42 45 47 49 4e | | BEGIN|
|00005410| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005420| 20 20 20 20 20 20 20 69 | 6e 74 65 72 6d 65 64 69 | i|ntermedi|
|00005430| 61 74 65 20 3a 3d 20 49 | 6e 74 4d 75 6c 74 69 70 |ate := I|ntMultip|
|00005440| 6c 79 28 74 68 65 56 61 | 6c 75 65 2c 20 74 68 65 |ly(theVa|lue, the|
|00005450| 4d 75 6c 74 69 70 6c 69 | 65 72 29 3b 0d 20 20 20 |Multipli|er);. |
|00005460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005470| 20 20 20 49 46 20 69 6e | 74 65 72 6d 65 64 69 61 | IF in|termedia|
|00005480| 74 65 20 3e 3d 20 30 20 | 54 48 45 4e 0d 20 20 20 |te >= 0 |THEN. |
|00005490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000054a0| 20 20 20 20 20 20 20 69 | 6e 74 65 72 6d 65 64 69 | i|ntermedi|
|000054b0| 61 74 65 20 3a 3d 20 69 | 6e 74 65 72 6d 65 64 69 |ate := i|ntermedi|
|000054c0| 61 74 65 20 2b 20 41 42 | 53 28 74 68 65 44 69 76 |ate + AB|S(theDiv|
|000054d0| 69 73 6f 72 29 20 64 69 | 76 20 32 0d 20 20 20 20 |isor) di|v 2. |
|000054e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000054f0| 20 20 45 4c 53 45 0d 20 | 20 20 20 20 20 20 20 20 | ELSE. | |
|00005500| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005510| 20 69 6e 74 65 72 6d 65 | 64 69 61 74 65 20 3a 3d | interme|diate :=|
|00005520| 20 69 6e 74 65 72 6d 65 | 64 69 61 74 65 20 2d 20 | interme|diate - |
|00005530| 41 42 53 28 74 68 65 44 | 69 76 69 73 6f 72 29 20 |ABS(theD|ivisor) |
|00005540| 64 69 76 20 32 3b 0d 20 | 20 20 20 20 20 20 20 20 |div 2;. | |
|00005550| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 53 63 61 | | Sca|
|00005560| 6c 65 49 6e 74 65 67 65 | 72 20 3a 3d 20 69 6e 74 |leIntege|r := int|
|00005570| 65 72 6d 65 64 69 61 74 | 65 20 44 49 56 20 74 68 |ermediat|e DIV th|
|00005580| 65 44 69 76 69 73 6f 72 | 3b 0d 20 20 20 20 20 20 |eDivisor|;. |
|00005590| 20 20 20 20 20 20 20 20 | 20 20 20 20 45 4e 44 3b | | END;|
|000055a0| 0d 09 49 6e 20 74 68 65 | 20 69 6d 70 6c 65 6d 65 |..In the| impleme|
|000055b0| 6e 74 61 74 69 6f 6e 20 | 6f 66 20 54 53 74 64 50 |ntation |of TStdP|
|000055c0| 72 69 6e 74 48 61 6e 64 | 6c 65 72 2e 43 68 65 63 |rintHand|ler.Chec|
|000055d0| 6b 50 72 69 6e 74 65 72 | 2c 20 72 65 70 6c 61 63 |kPrinter|, replac|
|000055e0| 65 20 74 68 65 20 6c 69 | 6e 65 73 3a 0d 20 20 20 |e the li|nes:. |
|000055f0| 20 20 20 20 20 20 20 20 | 20 20 20 53 65 74 52 65 | | SetRe|
|00005600| 63 74 28 74 68 65 4d 61 | 72 67 69 6e 73 2c 20 49 |ct(theMa|rgins, I|
|00005610| 6e 74 4d 75 6c 74 69 70 | 6c 79 28 74 68 65 4d 61 |ntMultip|ly(theMa|
|00005620| 72 67 69 6e 73 2e 6c 65 | 66 74 2c 20 68 29 20 44 |rgins.le|ft, h) D|
|00005630| 49 56 20 6f 6c 64 4d 61 | 72 67 69 6e 52 65 73 2e |IV oldMa|rginRes.|
|00005640| 68 2c 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |h,. | |
|00005650| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005660| 20 20 20 20 20 49 6e 74 | 4d 75 6c 74 69 70 6c 79 | Int|Multiply|
|00005670| 28 74 68 65 4d 61 72 67 | 69 6e 73 2e 74 6f 70 2c |(theMarg|ins.top,|
|00005680| 20 76 29 20 44 49 56 20 | 6f 6c 64 4d 61 72 67 69 | v) DIV |oldMargi|
|00005690| 6e 52 65 73 2e 76 2c 0d | 20 20 20 20 20 20 20 20 |nRes.v,.| |
|000056a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000056b0| 20 20 20 20 20 20 20 20 | 20 20 49 6e 74 4d 75 6c | | IntMul|
|000056c0| 74 69 70 6c 79 28 74 68 | 65 4d 61 72 67 69 6e 73 |tiply(th|eMargins|
|000056d0| 2e 72 69 67 68 74 2c 20 | 68 29 20 44 49 56 20 6f |.right, |h) DIV o|
|000056e0| 6c 64 4d 61 72 67 69 6e | 52 65 73 2e 68 2c 0d 20 |ldMargin|Res.h,. |
|000056f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005700| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005710| 20 49 6e 74 4d 75 6c 74 | 69 70 6c 79 28 74 68 65 | IntMult|iply(the|
|00005720| 4d 61 72 67 69 6e 73 2e | 62 6f 74 74 6f 6d 2c 20 |Margins.|bottom, |
|00005730| 76 29 20 44 49 56 20 6f | 6c 64 4d 61 72 67 69 6e |v) DIV o|ldMargin|
|00005740| 52 65 73 2e 76 29 3b 0d | 09 57 69 74 68 3a 0d 20 |Res.v);.|.With:. |
|00005750| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 53 65 74 | | Set|
|00005760| 52 65 63 74 28 74 68 65 | 4d 61 72 67 69 6e 73 2c |Rect(the|Margins,|
|00005770| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005780| 20 20 20 20 20 20 20 53 | 63 61 6c 65 49 6e 74 65 | S|caleInte|
|00005790| 67 65 72 28 74 68 65 4d | 61 72 67 69 6e 73 2e 6c |ger(theM|argins.l|
|000057a0| 65 66 74 2c 20 66 4d 61 | 72 67 69 6e 52 65 73 2e |eft, fMa|rginRes.|
|000057b0| 68 2c 20 6f 6c 64 4d 61 | 72 67 69 6e 52 65 73 2e |h, oldMa|rginRes.|
|000057c0| 68 29 2c 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |h),. | |
|000057d0| 20 20 20 20 20 20 20 20 | 20 20 53 63 61 6c 65 49 | | ScaleI|
|000057e0| 6e 74 65 67 65 72 28 74 | 68 65 4d 61 72 67 69 6e |nteger(t|heMargin|
|000057f0| 73 2e 74 6f 70 2c 20 66 | 4d 61 72 67 69 6e 52 65 |s.top, f|MarginRe|
|00005800| 73 2e 76 2c 20 6f 6c 64 | 4d 61 72 67 69 6e 52 65 |s.v, old|MarginRe|
|00005810| 73 2e 76 29 2c 0d 20 20 | 20 20 20 20 20 20 20 20 |s.v),. | |
|00005820| 20 20 20 20 20 20 20 20 | 20 20 20 20 53 63 61 6c | | Scal|
|00005830| 65 49 6e 74 65 67 65 72 | 28 74 68 65 4d 61 72 67 |eInteger|(theMarg|
|00005840| 69 6e 73 2e 72 69 67 68 | 74 2c 20 66 4d 61 72 67 |ins.righ|t, fMarg|
|00005850| 69 6e 52 65 73 2e 68 2c | 20 6f 6c 64 4d 61 72 67 |inRes.h,| oldMarg|
|00005860| 69 6e 52 65 73 2e 68 29 | 2c 0d 20 20 20 20 20 20 |inRes.h)|,. |
|00005870| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005880| 53 63 61 6c 65 49 6e 74 | 65 67 65 72 28 74 68 65 |ScaleInt|eger(the|
|00005890| 4d 61 72 67 69 6e 73 2e | 62 6f 74 74 6f 6d 2c 20 |Margins.|bottom, |
|000058a0| 66 4d 61 72 67 69 6e 52 | 65 73 2e 76 2c 20 6f 6c |fMarginR|es.v, ol|
|000058b0| 64 4d 61 72 67 69 6e 52 | 65 73 2e 76 29 29 3b 0d |dMarginR|es.v));.|
|000058c0| 33 2e 09 54 53 74 64 50 | 72 69 6e 74 48 61 6e 64 |3..TStdP|rintHand|
|000058d0| 6c 65 72 2e 43 68 65 63 | 6b 50 72 69 6e 74 65 72 |ler.Chec|kPrinter|
|000058e0| 20 63 61 6c 63 75 6c 61 | 74 65 73 20 66 4d 61 72 | calcula|tes fMar|
|000058f0| 67 69 6e 52 65 73 20 69 | 6e 63 6f 72 72 65 63 74 |ginRes i|ncorrect|
|00005900| 6c 79 20 66 6f 72 20 73 | 63 61 6c 65 64 20 70 72 |ly for s|caled pr|
|00005910| 69 6e 74 69 6e 67 2e 20 | 20 49 74 20 64 6f 65 73 |inting. | It does|
|00005920| 20 6e 6f 74 20 74 61 6b | 65 20 69 6e 74 6f 20 61 | not tak|e into a|
|00005930| 63 63 6f 75 6e 74 20 61 | 6e 79 20 73 63 61 6c 69 |ccount a|ny scali|
|00005940| 6e 67 20 66 61 63 74 6f | 72 73 20 69 6d 70 6f 73 |ng facto|rs impos|
|00005950| 65 64 20 62 79 20 74 68 | 65 20 75 73 65 72 20 69 |ed by th|e user i|
|00005960| 6e 20 74 68 65 20 5f 50 | 72 53 74 6c 44 69 61 6c |n the _P|rStlDial|
|00005970| 6f 67 20 64 69 61 6c 6f | 67 20 62 6f 78 2e 0d 46 |og dialo|g box..F|
|00005980| 69 78 3a 09 55 73 65 20 | 74 68 65 20 66 6f 6c 6c |ix:.Use |the foll|
|00005990| 6f 77 69 6e 67 20 75 6e | 74 69 6c 20 41 70 70 6c |owing un|til Appl|
|000059a0| 65 20 63 61 6e 20 63 6f | 6d 65 20 75 70 20 77 69 |e can co|me up wi|
|000059b0| 74 68 20 73 6f 6d 65 74 | 68 69 6e 67 20 62 65 74 |th somet|hing bet|
|000059c0| 74 65 72 2e 20 20 4e 6f | 74 65 20 74 68 61 74 20 |ter. No|te that |
|000059d0| 74 68 69 73 20 66 69 78 | 20 72 65 6c 69 65 73 20 |this fix| relies |
|000059e0| 6f 6e 20 74 68 65 20 75 | 6e 64 6f 63 75 6d 65 6e |on the u|ndocumen|
|000059f0| 74 65 64 20 66 69 65 6c | 64 73 20 70 72 53 74 6c |ted fiel|ds prStl|
|00005a00| 2e 69 50 61 67 65 56 20 | 61 6e 64 20 70 72 53 74 |.iPageV |and prSt|
|00005a10| 6c 2e 69 50 61 67 65 48 | 2e 20 20 41 64 64 69 74 |l.iPageH|. Addit|
|00005a20| 69 6f 6e 61 6c 6c 79 2c | 20 69 74 20 69 6d 70 6c |ionally,| it impl|
|00005a30| 65 6d 65 6e 74 73 20 61 | 20 64 75 62 69 6f 75 73 |ements a| dubious|
|00005a40| 20 74 65 63 68 6e 69 71 | 75 65 20 74 68 61 74 20 | techniq|ue that |
|00005a50| 67 65 74 73 20 61 72 6f | 75 6e 64 20 74 68 65 20 |gets aro|und the |
|00005a60| 61 73 73 75 6d 70 74 69 | 6f 6e 20 74 68 61 74 20 |assumpti|on that |
|00005a70| 61 6e 79 20 70 72 69 6e | 74 65 72 20 73 75 70 70 |any prin|ter supp|
|00005a80| 6f 72 74 69 6e 67 20 6c | 61 6e 64 73 63 61 70 65 |orting l|andscape|
|00005a90| 20 70 72 69 6e 74 69 6e | 67 20 61 6c 73 6f 20 73 | printin|g also s|
|00005aa0| 75 70 70 6f 72 74 73 20 | 5f 50 72 47 65 6e 65 72 |upports |_PrGener|
|00005ab0| 61 6c 2c 20 77 68 69 63 | 68 20 69 73 20 6e 6f 74 |al, whic|h is not|
|00005ac0| 20 61 6c 77 61 79 73 20 | 74 68 65 20 63 61 73 65 | always |the case|
|00005ad0| 3b 20 74 68 65 72 65 66 | 6f 72 65 2c 20 74 68 69 |; theref|ore, thi|
|00005ae0| 73 20 66 69 78 20 69 73 | 20 63 6f 6e 73 69 64 65 |s fix is| conside|
|00005af0| 72 65 64 20 74 65 6d 70 | 6f 72 61 72 79 2e 20 20 |red temp|orary. |
|00005b00| 59 6f 75 20 73 68 6f 75 | 6c 64 20 61 6c 72 65 61 |You shou|ld alrea|
|00005b10| 64 79 20 68 61 76 65 20 | 61 70 70 6c 69 65 64 20 |dy have |applied |
|00005b20| 74 68 65 20 66 69 78 20 | 74 6f 20 74 68 65 20 73 |the fix |to the s|
|00005b30| 65 63 6f 6e 64 20 62 75 | 67 20 69 6e 20 74 68 65 |econd bu|g in the|
|00005b40| 20 54 53 74 64 50 72 69 | 6e 74 48 61 6e 64 6c 65 | TStdPri|ntHandle|
|00005b50| 72 20 73 65 63 74 69 6f | 6e 2e 0d 09 49 6e 73 65 |r sectio|n...Inse|
|00005b60| 72 74 20 74 68 65 20 66 | 6f 6c 6c 6f 77 69 6e 67 |rt the f|ollowing|
|00005b70| 20 6c 6f 63 61 6c 20 70 | 72 6f 63 65 64 75 72 65 | local p|rocedure|
|00005b80| 20 61 66 74 65 72 20 53 | 63 61 6c 65 49 6e 74 65 | after S|caleInte|
|00005b90| 67 65 72 20 69 6e 20 20 | 54 53 74 64 50 72 69 6e |ger in |TStdPrin|
|00005ba0| 74 48 61 6e 64 6c 65 72 | 2e 43 68 65 63 6b 50 72 |tHandler|.CheckPr|
|00005bb0| 69 6e 74 65 72 20 28 66 | 69 6c 65 20 55 50 72 69 |inter (f|ile UPri|
|00005bc0| 6e 74 69 6e 67 2e 69 6e | 63 31 2e 70 29 3a 0d 20 |nting.in|c1.p):. |
|00005bd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 50 | | P|
|00005be0| 52 4f 43 45 44 55 52 45 | 20 41 64 6a 75 73 74 4d |ROCEDURE| AdjustM|
|00005bf0| 61 72 67 69 6e 52 65 73 | 3b 0d 20 20 20 20 20 20 |arginRes|;. |
|00005c00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 50 52 | | PR|
|00005c10| 4f 43 45 44 55 52 45 20 | 44 6f 41 64 6a 75 73 74 |OCEDURE |DoAdjust|
|00005c20| 4d 61 72 67 69 6e 52 65 | 73 3b 0d 20 20 20 20 20 |MarginRe|s;. |
|00005c30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c40| 20 20 20 56 41 52 0d 20 | 20 20 20 20 20 20 20 20 | VAR. | |
|00005c50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c60| 20 20 20 67 65 74 52 6f | 74 61 74 69 6f 6e 42 6c | getRo|tationBl|
|00005c70| 6f 63 6b 3a 20 54 47 65 | 74 52 6f 74 6e 42 6c 6b |ock: TGe|tRotnBlk|
|00005c80| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00005c90| 20 20 20 20 20 20 20 20 | 20 20 42 45 47 49 4e 0d | | BEGIN.|
|00005ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 57 49 54 48 | | WITH|
|00005cc0| 20 67 65 74 52 6f 74 61 | 74 69 6f 6e 42 6c 6f 63 | getRota|tionBloc|
|00005cd0| 6b 20 44 4f 20 42 45 47 | 49 4e 0d 20 20 20 20 20 |k DO BEG|IN. |
|00005ce0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005cf0| 20 20 20 20 20 20 20 20 | 20 20 20 69 4f 70 43 6f | | iOpCo|
|00005d00| 64 65 20 3a 3d 20 67 65 | 74 52 6f 74 6e 4f 70 3b |de := ge|tRotnOp;|
|00005d10| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005d20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d30| 20 6c 52 65 73 65 72 76 | 65 64 20 3a 3d 20 30 3b | lReserv|ed := 0;|
|00005d40| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d60| 20 68 50 72 69 6e 74 20 | 3a 3d 20 54 48 50 72 69 | hPrint |:= THPri|
|00005d70| 6e 74 28 66 48 50 72 69 | 6e 74 29 3b 0d 20 20 20 |nt(fHPri|nt);. |
|00005d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 62 58 74 | | bXt|
|00005da0| 72 61 20 3a 3d 20 30 3b | 0d 20 20 20 20 20 20 20 |ra := 0;|. |
|00005db0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005dc0| 20 20 20 20 20 45 4e 44 | 3b 0d 20 20 20 20 20 20 | END|;. |
|00005dd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005de0| 20 20 20 20 20 20 50 72 | 47 65 6e 65 72 61 6c 28 | Pr|General(|
|00005df0| 40 67 65 74 52 6f 74 61 | 74 69 6f 6e 42 6c 6f 63 |@getRota|tionBloc|
|00005e00| 6b 29 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |k);. | |
|00005e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005e20| 49 46 20 28 50 72 45 72 | 72 6f 72 20 3c 3e 20 6e |IF (PrEr|ror <> n|
|00005e30| 6f 45 72 72 29 20 7c 20 | 28 67 65 74 52 6f 74 61 |oErr) | |(getRota|
|00005e40| 74 69 6f 6e 42 6c 6f 63 | 6b 2e 69 45 72 72 6f 72 |tionBloc|k.iError|
|00005e50| 20 3c 3e 20 6e 6f 45 72 | 72 29 0d 20 20 20 20 20 | <> noEr|r). |
|00005e60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005e70| 20 20 20 20 20 20 20 20 | 20 54 48 45 4e 20 42 45 | | THEN BE|
|00005e80| 47 49 4e 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |GIN. | |
|00005e90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005ea0| 20 20 20 20 57 49 54 48 | 20 66 50 61 67 65 41 72 | WITH| fPageAr|
|00005eb0| 65 61 73 2e 74 68 65 50 | 61 70 65 72 20 44 4f 0d |eas.theP|aper DO.|
|00005ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005ed0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005ee0| 20 20 20 20 67 65 74 52 | 6f 74 61 74 69 6f 6e 42 | getR|otationB|
|00005ef0| 6c 6f 63 6b 2e 66 4c 61 | 6e 64 73 63 61 70 65 20 |lock.fLa|ndscape |
|00005f00| 3a 3d 20 72 69 67 68 74 | 20 2d 20 6c 65 66 74 20 |:= right| - left |
|00005f10| 3e 20 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |> . | |
|00005f20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f50| 20 20 20 20 20 20 62 6f | 74 74 6f 6d 20 2d 20 74 | bo|ttom - t|
|00005f60| 6f 70 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |op;. | |
|00005f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005f80| 20 20 20 20 50 72 53 65 | 74 45 72 72 6f 72 28 6e | PrSe|tError(n|
|00005f90| 6f 45 72 72 29 3b 20 7b | 20 63 6c 65 61 72 20 70 |oErr); {| clear p|
|00005fa0| 72 69 6e 74 20 65 72 72 | 6f 72 20 2d 20 50 72 69 |rint err|or - Pri|
|00005fb0| 6e 74 69 6e 67 20 0d 20 | 20 20 20 20 20 20 20 20 |nting . | |
|00005fc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 4d 61 6e 61 | | Mana|
|00005ff0| 67 65 72 20 77 6f 6e 27 | 74 20 64 6f 20 69 74 20 |ger won'|t do it |
|00006000| 7d 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |}. | |
|00006010| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 45 4e | | EN|
|00006020| 44 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |D;. | |
|00006030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 57 | | W|
|00006040| 49 54 48 20 66 50 61 67 | 65 41 72 65 61 73 2e 74 |ITH fPag|eAreas.t|
|00006050| 68 65 50 61 70 65 72 2c | 20 66 4d 61 72 67 69 6e |hePaper,| fMargin|
|00006060| 52 65 73 2c 20 54 48 50 | 72 69 6e 74 28 66 48 50 |Res, THP|rint(fHP|
|00006070| 72 69 6e 74 29 5e 5e 20 | 44 4f 20 42 45 47 49 4e |rint)^^ |DO BEGIN|
|00006080| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00006090| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000060a0| 20 7b 24 50 55 53 48 7d | 20 7b 24 48 2d 7d 20 7b | {$PUSH}| {$H-} {|
|000060b0| 20 73 68 75 74 20 75 70 | 2c 20 64 75 6d 62 20 63 | shut up|, dumb c|
|000060c0| 6f 6d 70 69 6c 65 72 21 | 20 7d 0d 20 20 20 20 20 |ompiler!| }. |
|000060d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000060e0| 20 20 20 20 20 20 20 20 | 20 20 20 49 46 20 67 65 | | IF ge|
|000060f0| 74 52 6f 74 61 74 69 6f | 6e 42 6c 6f 63 6b 2e 66 |tRotatio|nBlock.f|
|00006100| 4c 61 6e 64 73 63 61 70 | 65 20 54 48 45 4e 20 42 |Landscap|e THEN B|
|00006110| 45 47 49 4e 0d 20 20 20 | 20 20 20 20 20 20 20 20 |EGIN. | |
|00006120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006130| 20 20 20 20 20 7b 20 54 | 68 65 20 75 6e 64 6f 63 | { T|he undoc|
|00006140| 75 6d 65 6e 74 65 64 20 | 66 69 65 6c 64 73 20 70 |umented |fields p|
|00006150| 72 53 74 6c 2e 69 50 61 | 67 65 48 20 26 20 70 72 |rStl.iPa|geH & pr|
|00006160| 53 74 6c 2e 69 50 61 67 | 65 48 20 73 65 65 6d 0d |Stl.iPag|eH seem.|
|00006170| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006180| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006190| 20 20 75 6e 61 66 66 65 | 63 74 65 64 20 62 79 20 | unaffe|cted by |
|000061a0| 72 6f 74 61 74 69 6f 6e | 2c 20 73 6f 20 77 65 20 |rotation|, so we |
|000061b0| 68 61 76 65 20 74 6f 20 | 72 6f 74 61 74 65 20 74 |have to |rotate t|
|000061c0| 68 65 6d 20 7d 0d 20 20 | 20 20 20 20 20 20 20 20 |hem }. | |
|000061d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000061e0| 20 20 20 20 20 20 20 20 | 20 20 66 4d 61 72 67 69 | | fMargi|
|000061f0| 6e 52 65 73 2e 68 20 3a | 3d 20 53 63 61 6c 65 49 |nRes.h :|= ScaleI|
|00006200| 6e 74 65 67 65 72 28 69 | 50 72 50 67 46 72 61 63 |nteger(i|PrPgFrac|
|00006210| 74 2c 20 72 69 67 68 74 | 20 2d 20 6c 65 66 74 2c |t, right| - left,|
|00006220| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00006230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006240| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006250| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006260| 20 20 70 72 53 74 6c 2e | 69 50 61 67 65 56 29 3b | prStl.|iPageV);|
|00006270| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00006280| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006290| 20 20 20 20 20 66 4d 61 | 72 67 69 6e 52 65 73 2e | fMa|rginRes.|
|000062a0| 76 20 3a 3d 20 53 63 61 | 6c 65 49 6e 74 65 67 65 |v := Sca|leIntege|
|000062b0| 72 28 69 50 72 50 67 46 | 72 61 63 74 2c 20 62 6f |r(iPrPgF|ract, bo|
|000062c0| 74 74 6f 6d 20 2d 20 74 | 6f 70 2c 0d 20 20 20 20 |ttom - t|op,. |
|000062d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000062e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000062f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006300| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 70 72 53 | | prS|
|00006310| 74 6c 2e 69 50 61 67 65 | 48 29 3b 0d 20 20 20 20 |tl.iPage|H);. |
|00006320| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006330| 20 20 20 20 20 20 20 20 | 20 20 20 20 45 4e 44 0d | | END.|
|00006340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006350| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006360| 45 4c 53 45 20 42 45 47 | 49 4e 0d 20 20 20 20 20 |ELSE BEG|IN. |
|00006370| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00006380| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 66 | | f|
|00006390| 4d 61 72 67 69 6e 52 65 | 73 2e 68 20 3a 3d 20 53 |MarginRe|s.h := S|
|000063a0| 63 61 6c 65 49 6e 74 65 | 67 65 72 28 69 50 72 50 |caleInte|ger(iPrP|
|000063b0| 67 46 72 61 63 74 2c 20 | 72 69 67 68 74 20 2d 20 |gFract, |right - |
|000063c0| 6c 65 66 74 2c 0d 20 20 | 20 20 20 20 20 20 20 20 |left,. | |
|000063d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000063e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000063f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.